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,

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?
The Bridge Pattern.. Intent Decouple an abstraction from its implementation so that the two can vary independently Also known as: Handle/Body.
GRASP Patterns M Taimoor Khan
SOEN 343 Software Design Section H Fall 2006 Dr Greg Butler
Chapter 25 GRASP: More Objects with Responsibilities 1CS6359 Fall 2011 John Cole.
NJIT More GRASP Patterns Chapter 22 Applying UML and Patterns Craig Larman Prepared By: Krishnendu Banerjee.
Satzinger, Jackson, and Burd Object-Orieneted Analysis & Design
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.
October 20, 2005Architectural Design, ECEN Architectural Design Architecture Business Cycle Design for Maintainability ECEN 5543 / CSCI 5548 SW Eng.
Chapter 26 Applying Gang of Four Design Patterns 1CS6359 Fall 2012 John Cole.
Chapter 25 More Design Patterns.
COMP 6471 Software Design Methodologies Winter 2006 Dr Greg Butler
The Design Discipline.
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 SAD2 - UML 4 th Lecture Class Diagram in Construction Phase Patterns Case Study Lecturer: Dr Dimitrios Makris
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.
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.
Design Patterns. Patterns “Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution.
COMP 6471 Software Design Methodologies Winter 2006 Dr Greg Butler
Copyright © Craig Larman All Rights Reserved Responsibility-Driven Design with the GRASP Patterns.
CSSE 374: More GRASP’ing for Object Responsibilities
GRASP: Designing Objects with Responsibilities
IntellAgile Copyright © 2002 Craig Larman. All rights reserved. Object Design and Use- Case Realizations with GRASP Patterns.
Software Engineering 1 Object-oriented Analysis and Design Chap 24 Iteration 2 More Patterns.
OO Methodology Elaboration Iteration 2 - Design Patterns -
Gang of Four Patterns 23 total 15 useful How are they different from GRASP Patterns?
Patterns Roberto Damiani Mendes. Roteiro Definition; Definition; Architecture Patterns; Architecture Patterns; Design Patterns; Design Patterns; GRASP.
OO Design Roshan Chitrakar. Analysis to Design Do the RIGHT thing Do the RIGHT thing Requirement Analysis Requirement Analysis Domain Modeling with addition.
TK2023 Object-Oriented Software Engineering CHAPTER 8 LOGICAL ARCHITECTURE.
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
References: Applying UML and patterns Craig Larman
GRASP: More Patterns for Assigning Responsibilities Presented By Dr. Shazzad Hosain.
Object-Oriented Analysis and Design Week 12, 2009.
General Principles in Assigning Responsibilities Responsibilities Responsibility-Driven Design CRC Cards GRASP.
TK2023 Object-Oriented Software Engineering CHAPTER 13d GRASP Patterns: High Cohesion.
GRASP.
TK2023 Object-Oriented Software Engineering
Logical Architecture and UML Package Diagrams. The logical architecture is the large-scale organization of the software classes into packages, subsystems,
Elaboration popo.
GRASP – Designing Objects with Responsibilities
BTS530: Major Project Planning and Design
GRASP: Visibility and Design
GoF Patterns (GoF) popo.
Conception OBJET GRASP Patterns
TK2023 Object-Oriented Software Engineering
Apply Expert, Creator, Controller, Low Coupling, High Cohesion
The Object Oriented Approach to Design
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.
Starting Design: Logical Architecture and UML Package Diagrams
Software Design Lecture : 15.
Software Design Lecture : 14.
Chapter 25 GRASP The other four.
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.
Component Based & Software Reuse
GRASP.
Logical Architecture & UML Package Diagrams
GoF Patterns Ch. 26.
Object Oriented System Design Responsibilities
Presentation transcript:

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, realistic, and continuous verification of quality and correctness, So that early feedback guides the developers to improve the system, finding its "true path."

Elaboration: Iteration 2 Basics Iteration 1 ends with : Customers have been regularly engaged in evaluating the partial system And the customers get to see early visible progress with the system.

Elaboration: Iteration 2 Basics teration-2 largely ignores requirements analysis and domain analysis Focuses on object design with responsibilities and GRASP, and applying some (GoF) "gang-of- four" design patterns

UML Tools and UML as Blueprint There are three ways to apply UML include: 1) UML as sketch. 2) UML as blueprint 3) UML as programming language

UML Tools and UML as Blueprint There are three ways to apply UML include: 2) UML as blueprint This applies to both code and diagram generation. Detailed diagrams used to guide some code generation (e.g., Java). Diagrams are used to visualize the code base. After generating code, many fine details are usually filled in by developers while programming, using UML.

UML Tools and UML as Blueprint 3) UML as programming language Complete executable specification of a software system, with UML. Executable code will be automatically generated (or a virtual machine directly interprets UML), but it is not normally seen or modified by developers

GRASP: More Object Design

GRASP basic patterns: Information Expert, Creator, High Cohesion, Low Coupling, and Controller

GRASP: More Object Design Next four GRASP patterns are: Polymorphism Pure Fabrication Indirection Protected Variations

GRASP: More Object Design 1) Polymorphism Pattern Name: Polymorphism Problem: How handle alternatives based on type? How to create pluggable software components? Solution: When related alternatives or behaviors vary by type (class), assign responsibility for the behavior using polymorphic operations to the types for which the behavior varies

GRASP: More Object Design 1) Polymorphism Alternatives based on type : Conditional variation is a fundamental method in programs. If a program is designed using if-then-else or case statement conditional logic, then if a new variation arises, it requires modification of the case logic often in many places. This approach makes it difficult to easily extend a program with new variations because changes may be required in several places wherever the conditional logic exists.

GRASP: More Object Design 1) Polymorphism Pluggable software components In client-server relationships, how can you replace one server component with another, without affecting the client?

GRASP: More Object Design 1) Polymorphism Example In the NextGen POS In POS, multiple external third-party tax calculators that must be supported. Each tax calculator has a different interface, but varying behavior to adapt to each of these external fixed interfaces. One product may support a raw TCP socket protocol, another may offer a SOAP interface, and third may offer a Java RMI interface. Since the behavior of calculator varies by the type of calculator, by Polymorphism we should assign the responsibility for different calculator. The following figure, shows the Polymorphism in adapting to different external tax calculators for POS

GRASP: More Object Design 1) Polymorphism

GRASP: More Object Design 1) Polymorphism Polymorphism has several related meanings. In this context, it means "giving the same name to services in different objects"

GRASP: More Object Design 2) Pure Fabrication Pattern Name: Pure Fabrication Problem: What object should have the responsibility, when you do not want to violate High Cohesion and Low Coupling? Solution: Assign a highly cohesive set of responsibilities to an artificial class that does not represent a problem domain concept something made up, to support high cohesion, low coupling, and reuse.

GRASP: More Object Design 2) Pure Fabrication Such a class is a fabricated. Ideally, the responsibilities assigned to this fabrication support high cohesion and low coupling, so that the design of the fabrication is very clean. Finally, a pure fabrication implies making something up

GRASP: More Object Design 2) Pure Fabrication Example POS For example, suppose that support is needed to save Sale instances in a relational database. By Information Expert, there is some justification to assign this responsibility to the Sale class itself, because the sale has the data that needs to be saved. But consider the following implications:

GRASP: More Object Design 2) Pure Fabrication Example POS The task require is a relatively large number of supporting database-oriented operations, none related to the concept of sale-ness, so the Sale class becomes incohesive. The Sale class has to be coupled to the database interface (such as JDBC in Java), so its coupling goes up Saving objects in a database is a very general task for which many classes need support.

GRASP: More Object Design 2) Pure Fabrication Example POS A reasonable solution is to create a new class that is responsible for saving objects in the database; call it the PersistentStorage. This class is a Pure Fabrication of the imagination. PersistentStorage is not a domain concept, but something made up or fabricated for the convenience of the software developer.

GRASP: More Object Design 2) Pure Fabrication Example POS This Pure Fabrication solves the following design problems: The Sale remains well-designed, with high cohesion and low coupling. The PersistentStorage class is itself relatively cohesive, having the main purpose of storing in Database. The PersistentStorage class is a very generic and reusable object.

GRASP: More Object Design 3) Indirection Pattern Name: Indirection Problem: Where to assign a responsibility, to avoid direct coupling between two (or more) things? How to de-couple objects so that low coupling is supported and reuse potential remains higher? Solution: Assign the responsibility to an intermediate object to mediate between other components or services so that they are not directly coupled.

GRASP: More Object Design 3) Indirection The intermediary creates an indirection between the other components

GRASP: More Object Design 4) Protected Variations Pattern Name: Protected Variations Problem: How to design objects, subsystems, and systems so that the variations or instability in these elements does not have an undesirable impact on other elements? Solution: Identify points of predicted variation or instability; assign responsibilities to create a stable interface around them.

GRASP: More Object Design 4) Protected Variations For example, the external tax calculator problem and its solution with Polymorphism illustrate Protected Variations. The point of instability or variation is the different interfaces or APIs of external tax calculators. Internal objects collaborate with a stable interface; the various adapter implementations hide the variations to the external systems.