Patterns and Reuse. Patterns Reuse of Analysis and Design.

Slides:



Advertisements
Similar presentations
Object Oriented Game Framework Design Riz Verghese Joj.
Advertisements

Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Software Design l Objectives To explain how a software design may be represented.
Unit 251 Summary  Requirements may be represented in itemized format or in visual modeling (UML). Once the complete set of requirements are in our hand,
CS590L - Lecture 6 1 CS590L Distributed Component Architecture References: - E. Gamma, R. Helm, R. Johnson, J. Vlissides, Design Patterns: Elements of.
Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Patterns Architecture and Applications with EJB JavaForum.
Review Amit Shabtay. March 3rd, 2004 Object Oriented Design Course 2 Review What have we done during the course? Where to learn more? What is for the.
Design and Programming Patterns Associated with Java Networking by Margaret Toews cs843, Spring 2003.
Dept. of Computer Engineering, Amirkabir University of Tech. 1 Design Patterns Dr. Noorhosseini Introduction.
R R R CSE870: Advanced Software Engineering: Frameworks (Cheng, Sp2003)1 Frameworks A Brief Introduction.
Copyright © Active Frameworks, Inc.. - All Rights Reserved - V2.0 Introduction - Page L1-1 PS95&96-MEF-L1-1 Dr. M.E. Fayad Creationa l Paradigm.
HAS. Patterns The use of patterns is essentially the reuse of well established good ideas. A pattern is a named well understood good solution to a common.
CS350/550 Software Engineering Lecture 1. Class Work The main part of the class is a practical software engineering project, in teams of 3-5 people There.
© Copyright Eliyahu Brutman Programming Techniques Course.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Design Patterns.
Reuse Activities Selecting Design Patterns and Components
L6-1-S1Design Heuristics - 1 © M.E. Fayad SJSU -- CmpE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department,
Pattern Myths1 Ten Design Pattern Myths Jim Fawcett condensed from Pattern Hatching, John Vlissides, Addison-Wesley, 1998.
Programming Logic and System Analysis
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 16 Slide 1 User interface design.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
Design Patterns Discussion of pages: xi-11 Sections: Preface, Forward, Chapter
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 18 Slide 1 Software Reuse.
Software Engineering Muhammad Fahad Khan
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse.
Design Patterns.
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser Objectives Lecture 11 : Frameworks SWE 316: Software Design and Architecture  To understand.
©Ian Sommerville 2000 Software Engineering, 6th edition. Slide 1 Component-based development l Building software from reusable components l Objectives.
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
4/2/03I-1 © 2001 T. Horton CS 494 Object-Oriented Analysis & Design Software Architecture and Design Readings: Ambler, Chap. 7 (Sections to start.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse.
Creational Patterns CSE301 University of Sunderland Harry R Erwin, PhD.
Odyssey A Reuse Environment based on Domain Models Prepared By: Mahmud Gabareen Eliad Cohen.
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
R R R 1 Frameworks III Practical Issues. R R R 2 How to use Application Frameworks Application developed with Framework has 3 parts: –framework –concrete.
95-843: Service Oriented Architecture 1 Master of Information System Management Service Oriented Architecture Lecture 3: SOA Reference Model OASIS 2006.
1 Introduction to Software Engineering Lecture 1.
GRASP: Designing Objects with Responsibilities
Chapter 8 Object Design Reuse and Patterns. Object Design Object design is the process of adding details to the requirements analysis and making implementation.
ECE450S – Software Engineering II
CSC 480 Software Engineering Design With Patterns.
CSE 332: Design Patterns Review: Design Pattern Structure A design pattern has a name –So when someone says “Adapter” you know what they mean –So you can.
Security Patterns Template and Tutorial - Darrell M. Kienzle, Ph.D., Matthew C. Elder, Ph.D., David S. Tyree, James Edwards-Hewitt Presented by Dan Frohlich.
Advanced Object-Oriented Design Patterns and Architectures Part One COEN396A John Xiao
CS251 – Software Engineering Lectures 18: Intro to DP Slides by Rick Mercer, Christian Ratliff, Oscar Nierstrasz and others 1 و ابتغ فيما آتاك الله الدار.
Week 04 Object Oriented Analysis and Designing. What is a model? A model is quicker and easier to build A model can be used in simulations, to learn more.
Introduction (Continued) Design Patterns (I) Lecture Two.
The State Pattern (Behavioral) ©SoftMoore ConsultingSlide 1.
Design. Practices Principles Patterns What are the characteristics of good design? What are good solutions to common design problems? How do we go about.
Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Patterns Architecture and Applications with EJB Markus.
Intro to Web Services Dr. John P. Abraham UTPA. What are Web Services? Applications execute across multiple computers on a network.  The machine on which.
Design and implementation Chapter 7 – Lecture 1. Design and implementation Software design and implementation is the stage in the software engineering.
From Use Cases to Implementation 1. Structural and Behavioral Aspects of Collaborations  Two aspects of Collaborations Structural – specifies the static.
Class Relationships Lecture Oo08 Polymorphism. References n Booch, et al, The Unified Modeling Language User Guide, Chapt 10 p.125 n Fowler & Scott, UML.
1 Good Object-Oriented Design Dr. Radu Marinescu Lecture 4 Introduction to Design Patterns.
1 SOA Seminar Seminar on Service Oriented Architecture SOA Reference Model OASIS 2006.
Chapter 7 Lecture 1 Design and Implementation. Design and implementation Software design and implementation is the stage in the software engineering process.
From Use Cases to Implementation 1. Mapping Requirements Directly to Design and Code  For many, if not most, of our requirements it is relatively easy.
CLASSIFICATION OF DESIGN PATTERNS Hladchuk Maksym.
1 Advanced Software Architecture Muhammad Bilal Bashir PhD Scholar (Computer Science) Mohammad Ali Jinnah University.
Design Engineering 1. Analysis  Design 2 Characteristics of good design 3 The design must implement all of the explicit requirements contained in the.
Software Reuse. Objectives l To explain the benefits of software reuse and some reuse problems l To discuss several different ways to implement software.
GRASP – Designing Objects with Responsibilities
Design Patterns: MORE Examples
Introduction to Design Patterns
Distribution and components
Patterns.
CS590L Distributed Component Architecture References: - Objects, components, and framenworks with UML, Ch A Component Based Services Architecture.
Introduction to Design Patterns
Presentation transcript:

Patterns and Reuse

Patterns Reuse of Analysis and Design

Patterns Patterns describe common ways of doing things. They are collected by people who spot repeating themes in designs. They take each theme and describe it so that others can use it. They capture the static and dynamic structures and collaborations of successful solutions to problems that arise when building applications in a particular domain.

Patterns of Learning To be good at chess, you have to: –Know the rules. –Learn the principles. –Observe past games that were played (patterns). To become a good software engineer you have to: –Know the rules. –Learn the principles. –Observe past systems that are written (patterns).

Patterns Patterns == problem/solution pairs in a context They capture the static and dynamic structure and collaboration among key participants in software design They facilitate the reuse of successful software architectures and designs.

Patterns A pattern is much more than a model. It must contain the reason why it is the way it is. The pattern must: –Make the problem clear. –Explain why it solves the problem. –Explain in what circumstances it works. –Explain in what circumstances it does not work.

Design Pattern Descriptions Main parts –Name and intent –Problem and context –Requirements addressed –Abstract description of structure and collaborations in solution –Positive and negative consequences of use –Implementation guidelines and sample code –Known uses and related patterns

Design Pattern Descriptions Pattern descriptions are often independent of programming language or implementation details.

When to Use Patterns All the time. When trying to develop something in: –Analysis. –Design. –Coding. –Project management. Search for any available patterns that might help you.

Example Problem You have objects running in a process on your desktop. They need to communicate with other objects running in another process. –(Maybe on your desktop, maybe elsewhere). You don’t want the objects in your system to have to worry about finding other objects on the network or executing remote procedure calls.

Solution Create a proxy object within your local process for the remote object. – This has the same interface as the remote object. –Your local objects talk to the proxy using the usual in- process message sends. –The proxy is responsible for passing any messages on to the real object, wherever it may reside. Proxies are a common technique used in networks and elsewhere.

Reusing Experience Proxies have been used over and over again. People know: –How they can be used. –Their advantages. –Their limitations. –How to implement them. Proxy as a design pattern describes a design technique.

Documenting Patterns The general form for documenting patterns is to define items such as: –The motivation or context that this pattern applies to. –Prerequisites that should be satisfied before deciding to use a pattern. –A description of the program structure that the pattern will define. –A list of the participants needed to complete a pattern. –Consequences of using the pattern...both positive and negative. –Examples!

Sample design pattern In an ordering system, we often see the following pattern:

Patterns and Frameworks Patterns support reuse of software architecture and design Frameworks support reuse of detailed design and code. –A framework is an integrated set of components that collaborate to provide a reusable architecture for a family of related applications. Together, design patterns and frameworks help to –Improve software quality –Reduce development time.

Frameworks These are semi-complete applications. –Complete applications are developed by inheriting from and instantiating parameterised framework components. Frameworks provide domain-specific functionality. –e.g. business applications, telecommunication applications, window systems, databases, distributed applications, OS kernels.

Frameworks Exhibit inversion of control at run-time –i.e. the framework determines which objects and methods to invoke in response to events. –Microsoft Office is a framework. –Note the common patterns that are in use in this framework.

PowerPoint screen

Word screen

Excel screen

Game framework Tic-tac-toe and Chess. In both cases: –The game is played by two players –The game is played on a square, squared board. –Players move alternately. –To make a move is to alter the state of the board by adding, removing and / or moving some tokens, which are things on the board.

–Any token on the board is owned by one or other player. –All relevant information is available to both players. –Which moves are legal depends on the state of the board - which tokens are where- possibly together with other factors like the history of the play. –Who wins depends on the same factors.

Chess game

Tic Tac Toe game