Chapter 25 GRASP The other four.

Slides:



Advertisements
Similar presentations
Object-Oriented Analysis and Design CHAPTER 17, 25: GRASP PATTERNS 1.
Advertisements

GRASP The other four What are the first five? What is the goal/purpose of using patterns?
SOEN 343 Software Design Section H Fall 2006 Dr Greg Butler
October R. McFadyen1 Polymorphism Indirection Pure Fabrication Protected Variations (Law of Demeter) Ch 22: More GRASP Patterns.
Object-Oriented Software Engineering Practical Software Development using UML and Java Design Patterns – Part 2 Sources: Chapter 6: Using Design Patterns,
Chapter 25 GRASP: More Objects with Responsibilities 1CS6359 Fall 2011 John Cole.
Oct 21, R. McFadyen1 Pure Fabrication P Problem: You have a responsibility to assign to a class, but assigning it to a class in the conceptual.
NJIT More GRASP Patterns Chapter 22 Applying UML and Patterns Craig Larman Prepared By: Krishnendu Banerjee.
Fall 2009ACS-3913 Ron McFadyen1 idea was first put forth by Christopher Alexander (1977) in his work on architectural design principles a pattern is a.
Chapter 25 More Design Patterns. Polymorphism Issue: Conditional variation –If-then-else or switch statements –New variation or case: Conditional statements.
Fall 2009ACS-3913 R. McFadyen1 Polymorphism Indirection Pure Fabrication Protected Variations (Law of Demeter) More GRASP Patterns.
Chapter 3 Case Studies.
March 6, R. McFadyen1 Pure Fabrication P Problem: You have a responsibility to assign to a class, but assigning it to a class in the.
October 20, 2005Architectural Design, ECEN Architectural Design Architecture Business Cycle Design for Maintainability ECEN 5543 / CSCI 5548 SW Eng.
March R. McFadyen1 Pure Fabrication P Problem: You have a responsibility to assign to a class, but assigning it to a class in the conceptual.
System Design Decomposing the System. Sequence diagram changes UML 2.x specifications tells that Sequence diagrams now support if-conditions, loops and.
Chapter 26 Applying Gang of Four Design Patterns 1CS6359 Fall 2012 John Cole.
Chapter 25 More Design Patterns.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. The Façade Design Pattern (1) –A structural design pattern.
COMP 6471 Software Design Methodologies Winter 2006 Dr Greg Butler
COMP 6471 Software Design Methodologies Winter 2006 Dr Greg Butler
Object Oriented Programming Key Features of OO Approach Data encapsulation –data and methods are contained in a single unit, object –promotes internal.
GRASP Principles. How to Design Objects The hard step: moving from analysis to design How to do it? –Design principles (Larman: “patterns”) – an attempt.
Chapter 17. GRASP General Responsibility Assignment Software Patterns (Principles) OOD: after identifying requirements, create domain model, define responsiblities.
1 Chapter 17 GRASP Design Patterns: Designing Objects with Responsibilities.
SOEN 6011 Software Engineering Processes Section SS Fall 2007 Dr Greg Butler
Software Engineering 1 Object-oriented Analysis and Design Applying UML and Patterns An Introduction to Object-oriented Analysis and Design and Iterative.
Chapter 17. Initial Object Design Inputs: requirements meetings various Use Cases – 10% complete Key risks addressed with preliminary programming System.
GRASP: Designing Objects With Responsibilities
SOEN 343 Software Design Section H Fall 2006 Dr Greg Butler
SOEN 343 Software Design Section H Fall 2006 Dr Greg Butler
GoF Design Patterns (Ch. 26). GoF Design Patterns Adapter Factory Singleton Strategy Composite Façade Observer (Publish-Subscribe)
Chapter 17 GRASP: Designing Objects with Responsibilities. 1CS6359 Fall 2011 John Cole.
COMP 6471 Software Design Methodologies Winter 2006 Dr Greg Butler
Copyright © Craig Larman All Rights Reserved Responsibility-Driven Design with the GRASP Patterns.
Next Gen POS Example GRASP again. Same Patterns Different Example!
CSSE 374: More GRASP’ing for Object Responsibilities
Designing a Persistence Framework With Patterns
Chapter 38 Persistence Framework with Patterns 1CS6359 Fall 2011 John Cole.
SOEN 343 Software Design Section H Fall 2006 Dr Greg Butler
IntellAgile Copyright © 2002 Craig Larman. All rights reserved. Object Design and Use- Case Realizations with GRASP Patterns.
Gang of Four Patterns 23 total 15 useful How are they different from GRASP Patterns?
Copyright © Craig Larman All Rights Reserved COMP-350 Object-Oriented Analysis and Design GRASP: Designing Objects with Responsibilities Reference:
Chapter 17 Designing with Responsibilities. Fig
Refactoring Agile Development Project. Lecture roadmap Refactoring Some issues to address when coding.
GRASP: More Patterns for Assigning Responsibilities Presented By Dr. Shazzad Hosain.
(Further analysis and Refactoring) Larman, chapters 23 and 24 Glenn D. Blank, CSE432.
BTS430 Systems Analysis and Design using UML
TK2023 Object-Oriented Software Engineering CHAPTER 13d GRASP Patterns: High Cohesion.
GRASP.
TK2023 Object-Oriented Software Engineering
Elaboration: Iteration 2. Elaboration: Iteration 2 Basics Iteration 1 ends with : All the software has been tested: The idea in the UP is to do early,
BTS530: Major Project Planning and Design
GoF Patterns (GoF) popo.
Conception OBJET GRASP Patterns
TK2023 Object-Oriented Software Engineering
Apply Expert, Creator, Controller, Low Coupling, High Cohesion
SOEN 343 Software Design Section H Fall 2006 Dr Greg Butler
GoF Design Patterns (Ch. 26). GoF Design Patterns Adapter Factory Singleton Strategy Composite Façade Observer (Publish-Subscribe)
SOEN 343 Software Design Computer Science and Software Engineering Department Concordia University Fall 2005 Instructor: Patrice Chalin.
Chapter 23 Iteration 2.
SOEN 343 Software Design Computer Science and Software Engineering Department Concordia University Fall 2005 Instructor: Patrice Chalin.
GoF Design Patterns (Ch. 26)
SOEN 343 Software Design Computer Science and Software Engineering Department Concordia University Fall 2004 Instructor: Patrice Chalin.
Chapter 25 GRASP The other four.
SOEN 343 Software Design Computer Science and Software Engineering Department Concordia University Fall 2004 Instructor: Patrice Chalin.
GRASP.
Next Gen POS Example GRASP again.
GoF Patterns Ch. 26.
Object Oriented System Design Responsibilities
Presentation transcript:

Chapter 25 GRASP The other four

GRASP Polymorphism Indirection Pure Fabrication Protected Variations

Polymorphism Handle alternatives based on type Simplify methods by removing cases

Fig. 25.1

Implementation in Monoploy

Fig. 25.2

Fig. 25.3

Fig. 25.4 Go Square

Fig. 25.5 Regular Square

Fig. 25.6 Income Tax

Fig. 25.7 Goto Jail

Improving coupling Piece knows square, player does not Therefore player needs to use piece too often Refactor

Interfaces Choosing interfaces vs polymorhism

Pure Fabrication Assign a responsibility to avoid violations of High Cohesion and Low Coupling Make up an object to assign a highly cohesive set of responsibilities

Example: Databases and Sale Saving to database requires: DB Task requires a large number of support operations, unrelated to main class Sale Class has to be coupled to db connector Saving in DB is a general task using many support classes Fabricate DB persistence object

Dice in Monopoly Dice can be more general that just in monopoly Some games have a dice cup

Fig. 25.8

Fig. 25.9

Design of objects Representaional decomposition Behavioral decomposition

Indirection Avoid direct coupling

Fig. 25.10

Persistent Storage Often a good use of indirection

Protected Variations Design for object, subsystems or systems to reduce instability Identify predicated points of variation Create a stable interface Similar to indirection Hide structure and information

Summary