COP 3331 Object-Oriented Analysis and Design 1 Design Overview  Design Overview (Ch 6)  Review of RAD  System Design  System Design Concepts  System.

Slides:



Advertisements
Similar presentations
Design Patterns.
Advertisements

Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
Chapter 7 – Object-Oriented Design
Chapter 8, Object Design: Design Patterns II Using UML, Patterns, and Java Object-Oriented Software Engineering.
Solutions to Review Questions. 4.1 Define object, class and instance. The UML Glossary gives these definitions: Object: an instance of a class. Class:
** Reuse Activities ** Selecting Design Patterns and Components (Part 1) Done by Safaa khalil Meqdad.
Object-Oriented Analysis and Design
2 Object-Oriented Analysis and Design with the Unified Process Objectives  Explain how statecharts can be used to describe system behaviors  Use statecharts.
1 CS 501 Spring 2005 CS 501: Software Engineering Lecture 17 Object Oriented Design 3.
CS CS 5150 Software Engineering Lecture 17 Object Oriented Design 3.
Development Processes UML just is a modeling technique, yet for using it we need to know: »what do we model in an analysis model? »what do we model in.
1 IBM SanFrancisco Product Evaluation Negotiated Option Presentation By Les Beckford May 2001.
Reusing Patterns in the ARENA Case Study Done by: Fatma Al-Ansari.
Chapter 8, Object Design Introduction to Design Patterns
1 CS 501 Spring 2008 CS 501: Software Engineering Lectures 17 & 18 Object Oriented Design 3 & 4.
Satzinger, Jackson, and Burd Object-Orieneted Analysis & Design
Feb. 23, 2004CS WPI1 CS 509 Design of Software Systems Lecture #5 Monday, Feb. 23, 2004.
Design Patterns Based on Design Patterns. Elements of Reusable Object-Oriented Software. by E.Gamma, R. Helm, R. Johnson,J. Vlissides.
Dept. of Computer Engineering, Amir-Kabir University 1 Design Patterns Dr. Noorhosseini Lecture 2.
Chapter 8 Object Design Reuse and Patterns. Finding Objects The hardest problems in object-oriented system development are: –Identifying objects –Decomposing.
CS CS 5150 Software Engineering Lecture 16 Object Oriented Design 2.
CS CS 5150 Software Engineering Lecture 16 Object Oriented Design 2.
Reuse Activities Selecting Design Patterns and Components
Chapter 22 Object-Oriented Design
1 CS 501 Spring 2007 CS 501: Software Engineering Lectures 17 & 18 Object Oriented Design 3 & 4.
PRESENTED BY SANGEETA MEHTA EECS810 UNIVERSITY OF KANSAS OCTOBER 2008 Design Patterns.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
Chapter 8, Object Design: Design Patterns II Using UML, Patterns, and Java Object-Oriented Software Engineering.
Software Engineering Muhammad Fahad Khan
Design Patterns.
An Object-Oriented Approach to Programming Logic and Design
Software Design Refinement Using Design Patterns Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
Chapter 8, Object Design: Design Patterns II Using UML, Patterns, and Java Object-Oriented Software Engineering.
An Introduction to Software Architecture
©Ian Sommerville 2000 Software Engineering, 6th edition. Slide 1 Component-based development l Building software from reusable components l Objectives.
05 - Patterns Intro.CSC4071 Design Patterns Designing good and reusable OO software is hard. –Mix of specific + general –Impossible to get it right the.
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
Architecture GRASP Realization of use cases in interaction diagrams Design class diagram Design ( how )
Using UML, Patterns, and Java Object-Oriented Software Engineering Art for Chapter 8, Object Design: Reusing Pattern Solutions.
COP 3331 Object-Oriented Analysis and Design 1 Patterns Again  Review of design pattern concepts  What is a design pattern?  Modifiable designs  Patterns.
18 April 2005CSci 210 Spring Design Patterns 1 CSci 210.
Software Design Patterns (1) Introduction. patterns do … & do not … Patterns do... provide common vocabulary provide “shorthand” for effectively communicating.
Chapter 8 Object Design Reuse and Patterns. Object Design Object design is the process of adding details to the requirements analysis and making implementation.
Structural Design Patterns
ECE450S – Software Engineering II
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 8, Object Design: Introduction to Design Patterns.
Design Patterns CSIS 3701: Advanced Object Oriented Programming.
Copyright © Active Frameworks Inc. - All Rights Reserved - V2.0Design Pattern Catalog - Page L3-1 PS95&96-MEF-L10-1 Dr. M.E. Fayad Creationa.
Design Pattern. Definition: A design pattern is a general reusable solution to a commonly occurring problem within a given context in software design.
Design Patterns Introduction
Watching the movie the hard way…. Page 256 – Head First Design Patterns.
Chapter 8 Object Design Reuse and Patterns. More Patterns Abstract Factory: Provide manufacturer independence Builder: Hide a complex creation process.
CS 5150 Software Engineering Lecture 16 Program Design 3.
Object Design More Design Patterns Object Constraint Language Object Design Specifying Interfaces Review Exam 2 CEN 4010 Class 18 – 11/03.
Subtopics: 1. Frameworks :Reusable systems 2. Design Patterns 1.
11 Systems Analysis and Design in a Changing World, Fifth Edition.
Chapter 5 – Design and Implementation
Chapter 5:Design Patterns
Software Design Patterns
Design Patterns Lecture part 2.
Introduction to Design Patterns
OO Methodology OO Architecture.
Chapter 8, Object Design Introduction to Design Patterns
Frameworks And Patterns
Object-Oriented Design
An Introduction to Software Architecture
Structural Patterns: Adapter and Bridge
Chapter 8, Design Patterns Introduction
Chapter 8, DesignPatterns Facade
Chapter 10 – Component-Level Design
Presentation transcript:

COP 3331 Object-Oriented Analysis and Design 1 Design Overview  Design Overview (Ch 6)  Review of RAD  System Design  System Design Concepts  System Design Goals  (Global) System Design (Ch 7)  Design Goals  Software Architecture  Boundary Use Cases  SDD  Subsystem Design  Patterns (Ch 8)  Interfaces (Ch 9)  Mapping to Code (Ch 10)

COP 3331 Object-Oriented Analysis and Design 2 Re-Use  Design Patterns  Adapter, Bridge  Strategy, Command, Composite  Abstract Factory  Frameworks  Infrastructure  Middleware  Application  Whitebox / Blackbox  Libraries  Domain neutral  Independent and fine grain  Control passive  Components  Predefined instances (pre-compiled code)  Not modifiable

COP 3331 Object-Oriented Analysis and Design 3 Inheritance  Specification inheritance (recommended)  Interface inheritance  Re-use interface  Create a subtype  Example (from 3330): vehicle / truck / tanker  Implementation inheritance (use with caution)  Re-use (implementation) code  Example: List / OrderedList  Problems:  Not extensible (hard to change the implementation)  Not a subtype: can’t substitute for base class  C++ private inheritance overcomes subtype issue  Liskov Substitution Principle (LSP)  Definition: S is a subtype of T iff an object of type S can be substituted whenever an object of type T is expected  Principle: Use inheritance only for subtyping

COP 3331 Object-Oriented Analysis and Design 4 Delegation  Preferred for code reuse  Extensible: facilitates change of implementation  Does not create a false supertype  Delegation and Inheritance work together in design patterns

COP 3331 Object-Oriented Analysis and Design 5 Design Patterns  Name  Uniquely identifies pattern  Evokes details to designer  Problem description  Describes situations appropriate for using the pattern  Usually includes modifiability, extensibility, and nonfunctional design goals  Solution  State as a set of collaborating entities (mostly classes and objects)  Typically includes an illustration  Consequences  Describe the trade-offs and alternatives with respect to the design goals being addressed

COP 3331 Object-Oriented Analysis and Design 6 Adaptor [A.2] ClientInterface Request() adaptee LegacyClass ExistingRequest() Adapter Request() Client

COP 3331 Object-Oriented Analysis and Design 7 Adaptor Example  C++: std::stack (or fsu::CStack)  Uses vector (existing code) to define stack interface  ide19.html ide19.html  Note: “inheritance” is conceptual, but not necessarily realized by inheritance in the specific language!

COP 3331 Object-Oriented Analysis and Design 8 Bridge [A.3] (wikipedia)

COP 3331 Object-Oriented Analysis and Design 9 Bridge Example (text fig. 8-7) LeagueStoreImplementorLeagueStore imp XML Store Implementor Stub Store Implementor JDBC Store Implementor Arena

COP 3331 Object-Oriented Analysis and Design 10 Comparing Adaptor and Bridge  Using Inheritance and Delegation  Adaptor: inherits interface then delegates implementation  Bridge: delegates abstract implementation then derives specific implementations  Can derive from either construct  Adaptor  Assumes existing (“legacy”) code  Adapted code may be old and ugly or modern and useful  Either way, you are not intending to change the existing code  Bridge  Assumes you have not yet implemented the interface  Facilitates different implementation choices

COP 3331 Object-Oriented Analysis and Design 11 Strategy [A.9] (Text fig 8-10) NetworkInterface (strategy) open() close() send() receive() NetworkConnection (context) send() receive() setNetworkInterface() LocationManager (policy) Application (client) Ethernet open() close() send() receive() WaveLAN open() close() send() receive() UMTS open() close() send() receive()

COP 3331 Object-Oriented Analysis and Design 12 Strategy Example  The Strategy class (NetworkInterface) provides common interface to various concrete networks  The Context class (NetworkConnection) gives client access to connection methods  Client is a mobile application  Policy monitors current location and (re)configures network connections with appropriate network interfaces

COP 3331 Object-Oriented Analysis and Design 13 Command [A.4] (text fig. 8-13) GameBoard «binds» TicTacToeMove execute() ChessMove execute() Move execute() Match * replay() play()

COP 3331 Object-Oriented Analysis and Design 14 Composite [A.5] Component * CheckboxButtonCompositeLabel Panel Window Applet move() resize() move() resize()

COP 3331 Object-Oriented Analysis and Design 15 Figure 8-14, Anatomy of a preference dialog. Aggregates, called Panels, are used for grouping user interface objects that need to be resized and moved together. Top panel Main panel Button panel

COP 3331 Object-Oriented Analysis and Design 16 Figure 8-15, UML object diagram for the user interface objects of Figure top:Panel prefs:Window ok:Button main:Panelbuttons:Panel title:Label c2:Checkbox c3:Checkbox c4:Checkbox cancel:Button c1:Checkbox

COP 3331 Object-Oriented Analysis and Design 17 Abstract Factory [A.1] HouseFactory LightBulb EIBBulbLuxmateBulb LuxmateFactory EIBFactory createBulb() createBlind() Blind EIBBulbLuxmateBulb TheftApplication createBulb() createBlind() createBulb() createBlind()

COP 3331 Object-Oriented Analysis and Design 18 Façade [A.6] Encapsulate complex systems

COP 3331 Object-Oriented Analysis and Design 19 Observer [A.7] (fig 8-22) GameBoard state getState() playMove() Observer update() MatchView gameBoard update() observers * 1 Subject subscribe(Subscriber) unsubscribe(Subscriber) notify()

COP 3331 Object-Oriented Analysis and Design 20 Proxy [A.8]  Whenever direct access is undesirable (security, performance, flexibility)