© Keith Vander Linden, 2012 1 Dilbert © United Feature Syndicate, Inc.

Slides:



Advertisements
Similar presentations
GRASP: Designing Objects with Responsibilities
Advertisements

Visibility Larman, Chapter 19 (with ideas from George Blank of NJIT) CSE432 Object Oriented Software Engineering.
Object-Oriented Analysis and Design CHAPTER 17, 25: GRASP PATTERNS 1.
SOEN 343 Software Design Section H Fall 2006 Dr Greg Butler
SOEN 343 Software Design Section H Fall 2006 Dr Greg Butler
Design Patterns Yes, they are important Robert Cotton April 23, 2009.
Design Patterns CS is not simply about programming
Design Patterns Daniel McClain. Background What are they?  Way of recording solutions to recurring design problems History  “A Pattern Language: Towns,
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.
Spring 2010CS 2251 Design Patterns. Spring 2010CS 2252 What is a Design Pattern? "a general reusable solution to a commonly occurring problem in software.
March R McFadyen1 GoF (Gang of Four): Gamma, Johnson, Helm & Vlissides Book: Design Patterns: Elements of Reusable Object-Oriented Software.
Object-Oriented Software Engineering Practical Software Development using UML and Java Design Patterns Sources: Chapter 6: Using Design Patterns, and Chapter.
GRASP : Designing Objects with Responsibilities
NJIT Designing for Visibility Chapter 19 Applying UML and Patterns Craig Larman.
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.
PRESENTED BY SANGEETA MEHTA EECS810 UNIVERSITY OF KANSAS OCTOBER 2008 Design Patterns.
COMP 6471 Software Design Methodologies Winter 2006 Dr Greg Butler
Design Patterns Trends and Case Study John Hurst June 2005.
Chapter 7 GRASP patterns Dr Seham Mostefai CAP 252.
Software Design Refinement Using Design Patterns Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
Patterns 1 Patterns in OO - history 77 - Work of the architect Christopher Alexander 80s - Kent Beck playing with Smalltalk 91 - Gamma’s PhD thesis on.
Chapter 17. GRASP General Responsibility Assignment Software Patterns (Principles) OOD: after identifying requirements, create domain model, define responsiblities.
CSSE 374: Introduction to Gang of Four Design Patterns
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
Requirements To Design--Iteratively Chapter 12 Applying UML and Patterns Craig Larman.
SOEN 6011 Software Engineering Processes Section SS Fall 2007 Dr Greg Butler
BTS430 Systems Analysis and Design using UML Design Patterns.
Chapter 17. Initial Object Design Inputs: requirements meetings various Use Cases – 10% complete Key risks addressed with preliminary programming System.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 27. Review UML dynamic view – State Diagrams.
CS 325: Software Engineering February 12, 2015 Applying Responsibility-Assignment Patterns Design Patterns Situation-Specific Patterns Responsibility-Assignment.
GoF Design Patterns (Ch. 26). GoF Design Patterns Adapter Factory Singleton Strategy Composite Façade Observer (Publish-Subscribe)
CS212: Object Oriented Analysis and Design GRASP Design Principles.
COMP 6471 Software Design Methodologies Winter 2006 Dr Greg Butler
Copyright © Craig Larman All Rights Reserved Responsibility-Driven Design with the GRASP Patterns.
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
Software Design Patterns (1) Introduction. patterns do … & do not … Patterns do... provide common vocabulary provide “shorthand” for effectively communicating.
CSE 403 Lecture 14 Design Patterns. Today’s educational objective Understand the basics of design patterns Be able to distinguish them from design approaches.
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)
ECE450S – Software Engineering II
Introduction to Design Patterns Part 1. © Lethbridge/Laganière 2001 Chapter 6: Using design patterns2 Patterns - Architectural Architectural 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.
Advanced Object-Oriented Design Patterns and Architectures Part One COEN396A John Xiao
Design Patterns. 1 Paradigm4 Concepts 9 Principles23 Patterns.
CS251 – Software Engineering Lectures 18: Intro to DP Slides by Rick Mercer, Christian Ratliff, Oscar Nierstrasz and others 1 و ابتغ فيما آتاك الله الدار.
Chapter 17 Designing with Responsibilities. Fig
GRASP: More Patterns for Assigning Responsibilities Presented By Dr. Shazzad Hosain.
Design Patterns CSCE 315 – Programming Studio Spring 2013.
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,
The Object-Oriented Thought Process Chapter 15
GoF Patterns (GoF) popo.
Introduction to Design Patterns
Design Patterns Lecture part 2.
Conception OBJET GRASP Patterns
Design Patterns Introduction
SOEN 343 Software Design Computer Science and Software Engineering Department Concordia University Fall 2005 Instructor: Patrice Chalin.
Apply Expert, Creator, Controller, Low Coupling, High Cohesion
The Object Oriented Approach to Design
Introduction to Design Patterns Part 1
SOEN 343 Software Design Computer Science and Software Engineering Department Concordia University Fall 2005 Instructor: Patrice Chalin.
SOEN 343 Software Design Computer Science and Software Engineering Department Concordia University Fall 2005 Instructor: Patrice Chalin.
SOEN 343 Software Design Computer Science and Software Engineering Department Concordia University Fall 2005 Instructor: Patrice Chalin.
SOEN 343 Software Design Computer Science and Software Engineering Department Concordia University Fall 2004 Instructor: Patrice Chalin.
SOEN 343 Software Design Computer Science and Software Engineering Department Concordia University Fall 2004 Instructor: Patrice Chalin.
SOEN 343 Software Design Computer Science and Software Engineering Department Concordia University Fall 2004 Instructor: Patrice Chalin.
Presentation transcript:

© Keith Vander Linden, Dilbert © United Feature Syndicate, Inc.

© Keith Vander Linden, Design ● Introduction Introduction ● Patterns Patterns – GRASP Principles GRASP Principles – Gang of Four Patterns Gang of Four Patterns – Architectural Patterns Architectural Patterns ● No Silver Bullet No Silver Bullet Great designs come from great designers. Software construction is a creative process. - Brooks, 1975

© Keith Vander Linden, Design: Definition ● Design builds a conceptual solution that satisfies the requirements. ● It’s not analysis; distinguish between: – building the right product – building the product right ● It’s not implementation; distinguish between: – Conceptual solutions – Actual solutions Design definition from Larman, 2005

© Keith Vander Linden, Design: Goals ● Effectiveness ● Usefulness ● Adaptability ● Aesthetics

© Keith Vander Linden, Design: An Analogy to Architecture ● Vitruvius, the Roman architectural theorist set three goals of architecture: – Utilitas – Venustas – Firmitas ● The architect is responsible for the 1 st and 2 nd, the builder is responsible for the 3 rd. ● How would this map into software engineering?

© Keith Vander Linden, Design: Principles ● There are countless design approaches. ● The fundamental principles required to achieve the goals of design are: – Modularity High cohesion Low coupling – Information Hiding

© Keith Vander Linden, Orville & Wilbur Wright Wright Flier, 1903 images from wikipedia.org, the Library of Congress and Gary Bradshaw, June, 2006 ● The Wright brothers were careful designers. ● Their approach as to: – Study the field – Decompose the problem – Work iteratively – Improve with every step Basecamp, Kitty Hawk, 1902

© Keith Vander Linden, Patterns ● Patterns are design templates used systematically by good designers. ● Pattern include these key elements: – Name – Problem description – Structural solution – Application advice

© Keith Vander Linden, Christopher Alexander (1936-present) ● Alexander cataloged useful architectural patterns. ● His work inspired software patterns. images from and

© Keith Vander Linden, GRASP Principles ● Craig Larman identifies nine General Responsibility Assignment Software Patterns/Principles (GRASP). ● Here are some key examples: – Information expert – Controller – Indirection from Larman, 2005

© Keith Vander Linden, Information Expert ● Problem – What responsibilities should be assigned to what objects? ● Solution – Assign a responsibility to an object if it has the information required to satisfy the responsibility. models from Larman, 2005

© Keith Vander Linden, Controller ● Problem – Given the separation between the UI and domain layers, what domain object should control system operations? ● Solution – Assign control to either of the following fabricated objects: Façade controller Session controller models from Larman, 2005

© Keith Vander Linden, Indirection ● Problem – How can you decouple objects in order to support reuse or protect against variation? ● Solution – Fabricate an intermediate object that mediates between the other components. models from Larman, 2005

© Keith Vander Linden, GoF Patterns ● Gamma, Helm, Johnson, Vlissides identified a set of 23 commonly used patterns. ● Here are some key examples: – Adapter – Iterator – Singleton image from June, 2006http://

© Keith Vander Linden, Adapter ● Problem – What do you do when you have an existing class with the wrong sort of interface? ● Solution – Build an interface for an object that makes it look like another more common object. models from Gamma et al, 1995 Object Adaptor Class Adaptor

© Keith Vander Linden, Iterator ● Problem – What do you do when you need to access the elements of a generic aggregate object? ● Solution – Build generic element pointers that can be used polymorphically. models from Gamma et al, 1995

© Keith Vander Linden, Singleton ● Problem – How can you ensure that exactly one object of a class is created? ● Solution – Define a static method of the class that returns a single point of access. models from Larman, 2005

© Keith Vander Linden, Architectural Patterns ● Architecture is the large-scale structure of a software system. ● Generally a layered architecture is used: – User Interface – Application – Domain – Business Infrastructure – Technical services – Foundation model from Larman, 2005

© Keith Vander Linden, Fredrick P. Brooks, Jr. No Silver Bullet images from and MMM, 1995http:// What’s the Big Idea ● Brooks distinguished: – Essential difficulties – Accidental difficulties ● He also advocated the importance of good designers.