Architecture GRASP Realization of use cases in interaction diagrams Design class diagram Design ( how )

Slides:



Advertisements
Similar presentations
GRASP: Designing Objects with Responsibilities
Advertisements

Object-Oriented Analysis and Design
Object-Oriented Analysis and Design CHAPTER 17, 25: GRASP PATTERNS 1.
GRASP Patterns M Taimoor Khan
Oct 2, Ron McFadyen1 From the Merriam-Webster’s online dictionary ( Main Entry: an·thro·po·mor·phism Pronunciation: -"fi-z&m Function:
Feb R. McFadyen1 From the Merriam-Webster’s online dictionary ( Main Entry: an·thro·po·mor·phism Pronunciation: -"fi-z&m Function:
Copyright W. Howden1 Lecture 6: Design Evaluation and Intro to OO Design Patterns.
© 2005 Prentice Hall8-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
February Ron McFadyen1 From the Merriam-Webster’s online dictionary ( Main Entry: an·thro·po·mor·phism Pronunciation: -"fi-z&m.
Object-Oriented Software Engineering Practical Software Development using UML and Java Design Patterns Sources: Chapter 6: Using Design Patterns, and Chapter.
Low Coupling High Cohesion
NJIT 1 GRASP: Designing Objects with Responsibilities Chapter 17 Applying UML and Patterns Craig Larman.
GRASP : Designing Objects with Responsibilities
October 20, 2005Architectural Design, ECEN Architectural Design Architecture Business Cycle Design for Maintainability ECEN 5543 / CSCI 5548 SW Eng.
Design Patterns and Responsibility Assignment CMPT 371 Fall 2004 J.W. Benham.
Fall 2009ACS-3913 Ron McFadyen1 From the Merriam-Webster’s online dictionary ( Main Entry: an·thro·po·mor·phism Date: 1753 an interpretation.
Feb 4, Ron McFadyen1 founded on principles of good OO design idea was first put forth by Christopher Alexander (1977) in their work concerning.
CSSE 374: More GRASP’ing and Use Case Realization Steve Chenoweth Office: Moench Room F220 Phone: (812) These.
GRASP Design Patterns: Designing Objects with Responsibilities
GRASP Pattern Zhen Jiang West Chester University
GRASP Principles. How to Design Objects The hard step: moving from analysis to design How to do it? –Design principles (Larman: “patterns”) – an attempt.
GRASP Patterns Presented By Dr. Shazzad Hosain. Patterns A pattern describes a problem and solution, and given a name. Examples are Singleton, Adapter,
GRASP PATTERNS Information Expert (Expert) Creator Controller © Lethbridge/Laganière 2001 Chapter 6: Using design patterns1.
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.
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
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
BTS430 Systems Analysis and Design using UML Design Patterns.
GRASP: Designing Objects With Responsibilities Chapter 17 Applying UML and Patterns -Craig Larman.
CS 325: Software Engineering February 12, 2015 Applying Responsibility-Assignment Patterns Design Patterns Situation-Specific Patterns Responsibility-Assignment.
GRASP: Designing Objects With Responsibilities
Object-Oriented Analysis and Design Mar 11, 2008.
17. GRASP—Designing Objects with Responsibilities III CSE5324 Lecture Quiz 17 due at 5 PM Thursday, 8 October 2015.
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.
CS212: Object Oriented Analysis and Design GRASP Design Principles.
COMP 6471 Software Design Methodologies Winter 2006 Dr Greg Butler
Object-Oriented Design Part 2
Object-Oriented Design Principles and Patterns. © 2005, James R. Vallino2 How Do You Design? What principles guide you when you create a design? What.
Systems Analysis and Design in a Changing World, 3rd Edition
D ESIGN P ATTERNS Weslei A. de T. Marinho. T ALK O UTLINE Pattern Definition GRASP Patterns GoF Patterns GoF Patterns Classification Creational Patterns.
GRASP: Designing Objects with Responsibilities
IntellAgile Copyright © 2002 Craig Larman. All rights reserved. Object Design and Use- Case Realizations with GRASP Patterns.
What to remember from Chap 13 (Logical architecture)
Introduction to Design Patterns Part 1. © Lethbridge/Laganière 2001 Chapter 6: Using design patterns2 Patterns - Architectural Architectural Patterns:
Object-Oriented Analysis and Design Mar 9, 2008.
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.
Copyright © Craig Larman All Rights Reserved COMP-350 Object-Oriented Analysis and Design GRASP: Designing Objects with Responsibilities Reference:
GRASP: Designing Objects With Responsibilities
Chapter 17 Designing with Responsibilities. Fig
References: Applying UML and patterns Craig Larman
Design. 2 The Need for Software Blueprints Knowing an object-oriented language and having access to a library is necessary but not sufficient in order.
Oct 3, Ron McFadyen1 GRASP Patterns 1.Expert 2.Creator 3.Controller 4.Low Coupling 5.High Cohesion.
General Principles in Assigning Responsibilities Responsibilities Responsibility-Driven Design CRC Cards GRASP.
OO Methodology Elaboration Phase Iteration 1- Part 2.
TK2023 Object-Oriented Software Engineering CHAPTER 13d GRASP Patterns: High Cohesion.
TK2023 Object-Oriented Software Engineering
GRASP – Designing Objects with Responsibilities
Chapter 12: Collaboration Diagram - PART2
Conception OBJET GRASP Patterns
DESIGN MODEL: USE-CASE REALIZATIONS WITH GRASP PATTERNS
TK2023 Object-Oriented Software Engineering
Presentation on GRASP Patterns Submitted by
Apply Expert, Creator, Controller, Low Coupling, High Cohesion
GRASP : Designing Objects with Responsibilities
GRASP Design Patterns: Designing Objects with Responsibilities
Introduction to Design Patterns Part 1
Object Oriented System Design Responsibilities
Presentation transcript:

Architecture GRASP Realization of use cases in interaction diagrams Design class diagram Design ( how )

From analyses (what) to design (how) Specification of the requirement is looking at the system from the outside. Design is to open up the system and deicide how to implement the requirement. How do the object have to interact to implement the use cases? which responsibility(methods) do classes need to have? How can the system be implemented on the chosen platform?

Design activities Deciding the architecture Use of patterns Interaction diagrams Design class diagram

From analyses (what) to design (how) The domain model from the analysis will be transformed to a design class diagram The use case and system sequence diagram description will be used to make interaction diagrams. The methods and classes from the interactions diagram will be added to the design class diagram The domain model from the analysis will be transformed to a design class diagram The use case and system sequence diagram description will be used to make interaction diagrams. The methods and classes from the interactions diagram will be added to the design class diagram

Layered Architecture Presentation layer is the user interface The control layer, is controlling the use cases Model layer is the implementations of the model classes from the domain model and the containers Typical we need for practical reasons to be able to see the model classes from the presentation layer (called an open architecture)

Design pattern In object technology, a pattern is a named description of a problem and solution that can be applied to new contexts; ideally, it provides advice in how to apply it in varying circumstances, and considers the forces and trade-offs. Many patterns provide guidance for how responsibilities should be assigned to objects, given a specific category of problem. When a pattern is named, we can discuss with others a complex principle or design idea with a simple name.

GRASP Information Expert Creator High Cohesion Low Coupling Controller General Responsibility Assignment Software Patterns.

Controller Assign the responsibility for receiving or handling a system event message to a class representing one of the following choices: Represents a use case scenario within which the system event occurs Use the same controller class for all system events in the same use case scenario. Informally, a session is an instance of a conversation with an actor.

Information Expert (or Expert) Solution Assign a responsibility to the information expert. the class that has the information necessary to fulfill the responsibility. ProblemWhat is a general principle of assigning responsibilities to objects? A Design Model may define hundreds or thousands of software classes, and an application may require hundreds or thousands of responsibilities to be fulfilled. During object design, when the interactions between objects are defined, we make choices about the assignment of responsibilities to software classes. Done well, systems tend to be easier to understand, maintain, and extend, and there is more opportunity to reuse components in future applications. QuestionIn the Nørre Halne Camping A/S case, some class needs to know the grand total of a rent. Which class should that be based on the information above?

What information is needed to calculate the grand total Part of the domain model

Interaction diagram

Creator who should be responsible for creating a SalesLineltem instance? By Creator, we should look for a class that aggregates, contains, and so on, SalesLineltem instances

Creator Solution Assign class B the responsibility to create an instance of class A if one or more of the following is true:. B aggregates A objects.. B contains A objects.. B records instances of A objects.. B closely uses A objects.. B has the initializing data that will be passed to A when it is created (thus B is an Expert with respect to creating A). B is a creator of A objects. If more than one option applies, prefer a class B which aggregates or containsclass A. Problem Who should be responsible for creating a new instance of some class? The creation of objects is one of the most common activities in an object-oriented system. Consequently, it is useful to have a general principle for the assignment of creation responsibilities. Assigned well, the design can support low coupling, increased clarity, encapsulation, and reusability.

Creator

Low Copling Coupling is a measure of how strongly one element is connected to, has knowledge of, or relies on other elements. An element with low (or weak) coupling is not dependent on too many other elements; "too many" is context- dependent, but will be examined. These elements include classes, subsystems, systems, and so on. A class with high (or strong) coupling relies on many other classes. Such classes may be undesirable; some suffer from the following problems:. Changes in related classes force local changes.. Harder to understand in isolation.. Harder to reuse because its use requires the additional presence of the classes on which it is dependent.

High cohesion Solution Assign a responsibility so that cohesion remains high. Problem How to keep complexity manageable? In terms of object design, cohesion (or more specifically, functional cohesion) is a measure of how strongly related and focused the responsibilities of an element are. An element with highly related responsibilities, and which does not do a tremendous amount of work, has high cohesion. These elements include classes, subsystems, and so on. A class with low cohesion does many unrelated things, or does too much work. Such classes are undesirable; they suffer from the following problems:. hard to comprehend. hard to reuse. hard to maintain. delicate; constantly effected by change Low cohesion classes often represent a very "large grain" of abstraction, or have taken on responsibilities that should have been delegated to other objects.

Design class diagram

Example domain model to design class diagram