OBJECT-ORIENTED PATTERNS By: Peter Coad Presented by Peixin Chen.

Slides:



Advertisements
Similar presentations
Use Case & Use Case Diagram
Advertisements

Chapter 7 Structuring System Process Requirements
Object-Oriented Application Development Using VB.NET 1 Chapter 5 Object-Oriented Analysis and Design.
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 9 Slide 1 Appendix 3 Object-Oriented Analysis and Design.
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall A.1.
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1/18 Use Case Analysis – continued Control Classes.
Object-Oriented Analysis and Design
Use-case Modeling.
Irwin/McGraw-Hill Copyright © 2004 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS6th Edition.
May-June 2001 ISISTAN Research Institute – Tandil, Argentina Software Design Methodologies: UML in Action Dr. Mohamed Fayad, J.D. Edwards Professor Department.
© 2005 Prentice Hall4-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
Chapter 21 Object-Oriented Analysis
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix.
Objectives Explain the purpose and objectives of object- oriented design Develop design class diagrams Develop interaction diagrams based on the principles.
6. 2Object-Oriented Analysis and Design with the Unified Process Objectives  Explain how events can be used to identify use cases that define requirements.
Model View Controller (MVC) Architecture. Terminology and History MVC evolved from Smalltalk-80 Has become a key pattern in web based applications – If.
L6-1-S1Design Heuristics - 1 © M.E. Fayad SJSU -- CmpE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department,
C++ fundamentals.
Chapter 7 Structuring System Process Requirements
The chapter will address the following questions:
Systems Analysis and Design in a Changing World, Tuesday, Feb 27
Object Oriented Analysis By: Don Villanueva CS 524 Software Engineering I Fall I 2007 – Sheldon X. Liang, Ph. D.
1 Object-Oriented Testing CIS 375 Bruce R. Maxim UM-Dearborn.
Model View Controller (MVC) Rick Mercer with a wide variety of others 1.
Chapter 7 Structuring System Process Requirements
Interaction Modeling Interaction model describes how objects interact to produce useful results. Interactions can be modeled at different levels of abstraction:
Copyright 2001 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix A Object-Oriented.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
Programming in Java Unit 3. Learning outcome:  LO2:Be able to design Java solutions  LO3:Be able to implement Java solutions Assessment criteria: 
Object-Oriented Software Development F Software Development Process F Analyze Relationships Among Objects F Class Development F Class Design Guidelines.
1 UML Basic Training. UML Basic training2 Agenda  Definitions: requirements, design  Basics of Unified Modeling Language 1.4  SysML.
Systems Analysis and Design in a Changing World, 3rd Edition
Chapter 13 Logical Architecture and UML Package Diagrams 1CS6359 Fall 2012 John Cole.
Requirements as Usecases Capturing the REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
GRASP: Designing Objects with Responsibilities
UML diagrams What is UML UML diagrams –Static modeoing –Dynamic modeling 1.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
Modeling system requirements. Purpose of Models Models help an analyst clarify and refine a design. Models help simplify the complexity of information.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
A Use Case Primer 1. The Benefits of Use Cases  Compared to traditional methods, use cases are easy to write and to read.  Use cases force the developers.
1 Structuring Systems Requirements Use Case Description and Diagrams.
An Introduction to the Unified Modeling Language
Model View Controller (MVC) Bigger than a Pattern: It’s an Architecture Rick Mercer with help from many others 1.
1 System Analysis and Design Using UML INSTRUCTOR: Jesmin Akhter Lecturer, IIT, JU.
Course Instructor: Kashif Ihsan 1. Chapter # 3 2.
Introduction to Object Modeling
Part VII: Design Continuous
Model View Controller (MVC) Bigger than a Pattern: It’s an Architecture Rick Mercer with help from many of others 1.
7. 2Object-Oriented Analysis and Design with the Unified Process Objectives  Detailed Object-Oriented Requirements Definitions  System Processes—A Use.
Chapter 7 Structuring System Process Requirements Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
22 August, 2007Information System Design IT60105, Autumn 2007 Information System Design IT60105 Lecture 8 Use Case Diagrams.
Lecture 14 22/10/15. The Object-Oriented Analysis and Design  Process of progressively developing representation of a system component (or object) through.
Object-Oriented Application Development Using VB.NET 1 Chapter 5 Object-Oriented Analysis and Design.
Model View Controller (MVC) an architecture Rick Mercer with help from many of others 1.
Fusion Design Overview Object Interaction Graph Visibility Graph Class Descriptions Inheritance Graphs Fusion: Design The overall goal of Design is to.
M1G Introduction to Programming 2 2. Creating Classes: Game and Player.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Appendix A Object-Oriented Analysis and Design A.1.
© 2005 by Prentice Hall Chapter 7 Structuring System Process Requirements Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George.
Appendix Object-Oriented Analysis and Design: Use Cases and Sequence Diagrams Modern Systems Analysis and Design Fifth Edition Jeffrey A. Hoffer Joey F.
Unified Modeling Language. What is UML? Standard language for specifying, visualizing, constructing, and documenting the artifacts of software systems,
Unified Modeling Language
Objectives State the reasons for the complexity involved in the development of software Define the following terms Objects Classes Messages Methods Explain.
Chapter 20 Object-Oriented Analysis and Design
CIS 375 Bruce R. Maxim UM-Dearborn
Appendix A Object-Oriented Analysis and Design
CIS 375 Bruce R. Maxim UM-Dearborn
Use Case Analysis – continued
Appendix A Object-Oriented Analysis and Design
Presentation transcript:

OBJECT-ORIENTED PATTERNS By: Peter Coad Presented by Peixin Chen

What is pattern? Pattern A fully realized form, original, or model accepted or proposed for imitation; something regarded as a normative example to be copied; archetype; exemplar. Patterns apply to many disciplines.

How to discover patterns? “Look more carefully… to find out what it really is that is repeating there…” “Each building or town is defined by certain patterns of relationships among the elements…” “These relationships are not extra, but necessary to the elements…”

Patterns in OOA/OOD Class and its object are the elements in low-level building block, and they are the constantly repeating lowest-level elements. Patterns of lowest-level elements and relationships between them form a building block for more effective OOA and OOD. Existing patterns: generalization-specification, whole-part, association, and messaging.

Object-oriented patterns An object-oriented pattern is an abstraction of a double, triplet, or other small grouping of classes that is likely to be helpful again and again in object- oriented development. Patterns are found by trial-and-error and by observation.

Severn Patterns -- Notation ClassName This is a class symbol. It has no directly corresponding objects This is a class-&-object symbol. The lighter border represents an object in that class. Attributes are listed in the center section. They depict what an object knows Services are listed in the lower section. They define what an object does

Notation (2) Generalizati onClass Specializai tonClass Gen-spec structure Whole Part Whole-part structure

Notation (3) Sender Receiver The solid line is an association connection, indicating that one object needs to know about another object. The arrow is a message connection.

Item description pattern Item Item description Guideline: when some attribute values may apply to more than one object in a class. Aircraft tailnum aircraftDescription Model manufacture Aircraft tailnum

Time Association Pattern Guideline: whenever the system is responsible to know an association between two or more objects and to know or do something about that association If participant1 and participant2 is in one association, and one needs to express attributes or services regarding that association, then an object from time association is needed

Event Logging Pattern Device EventReme mbered Guideline: whenever an event is detected, and you need to log its occurrence to support after-the-fact analysis or to meet legal requirements.

Role Played Pattern Player PlayerR ole PlayerRol e1 PlayerRol e2 Guideline: whenever you have a player object which remains the same old player object, but has different attributes and services. More concise and flexible than attempting to use multiple inheritance to model a large numbers of roles.

State Across a Collection Collection Member Guideline: whenever there is a whole-part relationship, and one or more attributes apply to the whole.

Behavior Across a Collection Pattern Collection Member Guideline: whenever there is a whole-part relationship and a behavior applies across the whole collection. A collection object has a behavior that applies across an entire collection of its member objects. Caution: only put behavior that really applies across the collection up into collection object.

Broadcast Pattern ReceivingItem BroadcastingItem This pattern is used to communicate complex changes between one major section of an OOA/OOD model with another major section. In ParcPlace System’s ObjectWorks, this application of a broadcast pattern is called model-view- controller (MVC). Guideline: Use this pattern to establish interactions between major OOA/OOD parts in a way that two sections stay cleanly separated.

MVC In the MVC paradigm the user input, the modeling of the external world, and the visual feedback to the user are explicitly separated and handled by three types of object, each specialized for its task. The view manages the graphical and/or textual output to the portion of the bitmapped display that is allocated to its application. The controller interprets the mouse and keyboard inputs from the user, commanding the model and/or the view to change as appropriate. Finally, the model manages the behavior and data of the application domain, responds to requests for information about its state (usually from the view), and responds to instructions to change state (usually from the controller). The MVC behavior is then inherited, added to, and modified as necessary to provide a flexible and powerful system.

Summary A pattern is a fully realized form, original, or model accepted or proposed for imitation. With patterns, small piecework is standardized into a larger chunk or unit. Patterns become the building blocks for design and construction. Finding and applying patterns indicates progress in a field of human endeavor. The End