Object Design II: Design Patterns

Size: px
Start display at page:

Download "Object Design II: Design Patterns"

Transcription

1 Object-Oriented Software Engineering Using UML, Patterns, and Java Object Design II: Design Patterns Bernd Bruegge Applied Software Engineering Technische Universitaet Muenchen

2 A Game: Get-15 The game starts with nine numbers 1,2,3,4,5,6,7,8 and 9 You and your opponent take alternate turns, each taking a number Each number can be taken only once: If you opponent has selected a number, you can no longer take it The first person to have any three numbers that total 15 wins the game Example: You: Opponent: Opponent Wins! Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 6

3 Characteristics of Get-15 Hard to play The game is especially hard, if you are not allowed to write anything down Why? All the numbers must be scanned to see if you have won/lost It is hard to see what the opponent will take if you take a certain number The choice of the next number depends on all the previous numbers (your and your opponent s numbers) Not easy to devise a simple strategy. Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 7

4 Another Game: Tic-Tac-Toe Source: Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 8

5 A Draw Situation Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 9

6 Strategy for determining a winning move Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 10

7 Winning Situations for Tic-Tac-Toe Winning Patterns Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 11

8 Tic-Tac-Toe is Easy Why? Reduction of complexity through patterns and symmetry Patterns: Knowing the following three patterns, the player can anticipate the opponents move. Symmetry: The player needs to remember only these three patterns to deal with 8 different game situations The player needs to memorize only 3 opening moves and their responses. Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 12

9 Get-15 and Tic-Tac-Toe are identical problems Any sequence of three numbers that wins the Get-15 game also wins at Tic-Tac-Toe Any Tic-Tac-Toe solution is also a solution to Get-15 problem To see the relationship between the two games, we simply arrange the 9 digits into the following pattern Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 13

10 You: Opponent: Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 14

11 Stays simple! During object modeling we do many transformations and changes to the object model It is important to make sure the system model stays simple during these model transformations After all, the goal of a model is to be an abstraction, that is, a simplification, not a complication Design patterns keep the system model simple. Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 15

12 Heuristics for Good Models Modeling must address our mental limitations: Our short-term memory has only limited capacity (7+-2) Good models deal with this limitation, because they do not tax the mind A good model requires a minimal mental effort to understand they reduce complexity Use of patterns Use of symmetries they use abstractions Taxonomies they have organizational structure Memory limitations are overcome with an appropriate representation ( natural model ). Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 16

13 Outline of the Lecture Two games Patterns and symmetry help to win the game Heuristics for good models Reducing the complexity of models Patterns covered in this lecture Composite: Model dynamic aggregates Facade: Interfacing to subsystems Adapter: Interfacing to existing systems (legacy systems) Bridge: Interfacing to existing and future systems Next lecture Factory and Abstract Factory Proxy Observer Strategy Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 17

14 Review: Design pattern A design pattern is a reusable template for solving a recurring design problem Basic idea: Don t re-invent the wheel! design knowledge Knowledge on a higher level than classes, algorithms or data structures (linked lists, binary trees...) Lower level than application frameworks an example of modifiable design Learning how to design starts by studying other designs. Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 18

15 Why are modifiable designs important? A modifiable design enables an iterative and incremental development concurrent development risk management flexibility to change minimizes the introduction of new problems when fixing old ones allows to easily add more functionality after the delivery of the system Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 19

16 What makes a design modifiable? Low coupling and high cohesion Clear dependencies Explicit assumptions How do design patterns help? They are generalized from existing systems They provide a shared vocabulary to designers They provide examples of modifiable designs Abstract classes Delegation Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 20

17 Recall: Finding Objects The hardest problems in object-oriented system development are: Identifying objects Decomposing the system into objects Requirements Analysis focuses on application domain: Object identification System Design addresses both, application and implementation domain: Subsystem identification Object Design focuses on implementation domain: Additional solution objects. Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 21

18 Recall: Techniques for Finding Objects Requirements Analysis Start with Use Cases. Identify participating objects Textual analysis of flow of events (find nouns, verbs,...) Extract application domain objects by interviewing client (application domain knowledge) Find objects by using general knowledge System Design Subsystem decomposition Try to identify architectural style Object Design Find additional objects by applying implementation domain knowledge Try to identify design patterns. Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 22

19 COMPOSITE PATTERN Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 23

20 What is common between these definitions? Definition Software System A software system consists of subsystems which are either other subsystems or collection of classes Definition Software Lifecycle A software lifecycle consists of a set of development activities which are either other actitivies or collection of tasks. Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 24

21 What is common between these definitions? Definition Software System A software system consists of subsystems which are either other subsystems or collection of classes Composite: Subsystem (A software system consists of subsystems which consists of subsystems, which consists of subsystems, which...) Leaf node: Class Definition Software Lifecycle A software lifecycle consists of a set of development activities which are either other actitivies or collection of tasks Composite: Activity (A software lifecycle consists of activities which consist of activities, which consist of activities, which...) Leaf node: Task. Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 25

22 Introducing the Composite Pattern Tree structures that represent part-whole hierarchies with arbitrary depth and width can be used in the solution of many problems The Composite Pattern lets a client treat individual objects and compositions of these objects uniformly Client Component Operation() Leaf Operation() Composite Operation() AddComponent() RemoveComponent() GetChildren() Children

23 Modeling a Software System with a Composite Pattern User Software System Class Subsystem Children Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 27

24 Modeling the Software Lifecycle with a Composite Pattern Manager Software Lifecycle Task Activity Children Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 28

25 The Composite Patterns models Dynamic Aggregates Fixed Structure: Car Doors Wheels Battery Engine Organization Chart (variable aggregate): University School Department Dynamic tree (recursive aggregate): Composite Pattern Program Block Compound Statement Simple Statement Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 29

26 Graphic Applications use the Composite Pattern The Graphic Class represents both primitives (Line, Circle) and containers (Picture). Client Graphic Draw() Line Draw() Circle Draw() Picture Draw() Add(Graphic g) RemoveGraphic) GetChild(int) Children Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 30

27 Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 31

28 The Java s AWT library can be modeled with the component pattern Graphics Component getgraphics() Text Component Button Label Container add(component c) paint(graphics g) TextField TextArea Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 32

29 Reducing the Complexity of Models Modeling is about communication To a human being (être humain) as well as to a tool To communicate a complex model to a human being we use navigation and reduction of complexity Navigate through the model so the user can follow it Start with a very simple model Identify the key abstractions Then decorate the model with additional classes To reduce the complexity of the model further Look for inheritance (taxonomies) If the model is too complex, taxonomies should be placed in separate UML packages Then identify or introduce patterns in the model Make sure to use the name of the patterns. Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 33

30 Example: Modeling a Project Project Equipment Facility Resource Fund Outcome Schedule produces Organization Work Breakdown Structure des- Work cribespackage con- sumes Organizational Work respon- Unit sible plays depends for Role Set of Work Products Work Product Activity Task Participant Staff Internal Work Product Project Deliverable Project Function Department Team Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 34

31 How to reduce the Complexity of the Model 1. Look for the key abstractions Project, Outcome, Schedule, Work, Resource 2. Identify patterns: For example, the project model has 3 composite patterns 3. Find all the application domain taxonomies Start with the taxonomies for the key abstractions 4. Key abstractions, patterns and/or taxonomies are candidates for separate UML packages. Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 35

32 1. Find the Key Abstractions in the Model Key Abstractions Project Equipment Facility Resource Fund Outcome Schedule produces Organization Work Breakdown Structure des- Work cribespackage con- sumes Organizational Work respon- Unit sible plays depends for Role Set of Work Products Work Product Activity Task Participant Staff Internal Work Product Project Deliverable Project Function Department Team Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 36

33 Key Abstractions in the Project Model Project Outcome Schedule Work Resource Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 37

34 2. Find Patterns used in the Model Project Equipment Facility Composite Patterns Outcome Schedule produces Resource Fund Organization Work Breakdown Structure des- Work cribespackage con- sumes Organizational Work respon- Unit sible plays depends for Role Set of Work Products Work Product Activity Task Participant Staff Internal Work Product Project Deliverable Project Function Department Team Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 38

35 Composite Patterns in the Project Model Outcome Work Organizational Unit Set of Work Products Work product Activity Task Staff Participant Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 39

36 3. Find the Taxonomies used in the Model Taxonomies Project Equipment Facility Resource Fund Outcome Schedule produces Organization Work Breakdown Structure des- Work cribespackage con- sumes Organizational Work respon- Unit sible plays depends for Role Set of Work Products Work Product Activity Task Participant Staff Internal Work Product Project Deliverable Project Function Department Team Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 40

37 Step 4: Package based on Key Abstractions Project Project Outcome Schedule Work Resource Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 41

38 Step 4 continued: Additional Packages based on Patterns Outcome Work Organization Outcome Work Organizational Unit Set of Work Products Work product Activity Task Staff Participant Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 42

39 Step 4 continued: Additional UML Packages based on Taxonomies Resource Resource Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 43

40 Summary Design patterns are template solutions for common design problems such as separating an interface from a number of alternate implementations Accessing a set of legacy classes protecting a caller from changes associated with specific platforms A design pattern consists of a small number of classes uses delegation and inheritance provides a modifiable design solution These classes can be adapted and refined for the specific system under construction To provide the reuse of existing solutions Customization of the system. Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 51

41 Additional Readings E. Gamma et.al., Design Patterns, M. Fowler, Analysis Patterns: Reusable Object Models, 1997 F. Buschmann et. Al., Pattern-Oriented Software Architecture: A System of Patterns, 1996 T. J. Mowbray & R. C. Malveau, CORBA Design Patterns, 1997 S. W. Ambler, Process Patterns: Building Large-Scale Systems Using Object Technology, Dependency management: P. Feiler & W. Tichy, Propagator: A family of patterns, in Proceedings of TOOLS-23'97, Santa Barbara, CA, Aug, Configuration management: W. J. Brown et. Al., AntiPatterns and Patterns in Software Configuration Management, Plus ludique : Head First Design Patterns A Brain-Friendly Guide By Bert Bates, Kathy Sierra, Eric Freeman, Elisabeth Robson Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 52

42 Backup Slides Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 53

43 Notation used in the Design Patterns Book Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides, Design Patterns: Elements of Reusable Object-Oriented Software, Addison Wesley, 1995 Based on OMT (a precursor to UML). Notational differences between the OMT notation and UML: Attributes come after the Operations Associations are called acquaintances Multiplicities are shown as solid circles Dashed line: Instantiation Association (Class can instantiate objects of associated class) (In UML it denotes a dependency) UML Note is called Dog-ear box (connected by dashed line to class operation): Pseudo-code implementation of operation. Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 54

A Rapid Overview of UML

A Rapid Overview of UML A Rapid Overview of UML The Unified dmodeling Language (UML) Emerged in the mid 90s as the de facto standard for softwareengineering engineering design Use case diagram depicts user interaction with system

More information

Topics in Object-Oriented Design Patterns

Topics in Object-Oriented Design Patterns Software design Topics in Object-Oriented Design Patterns Material mainly from the book Design Patterns by Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides; slides originally by Spiros Mancoridis;

More information

Using Design Patterns in Java Application Development

Using Design Patterns in Java Application Development Using Design Patterns in Java Application Development ExxonMobil Research & Engineering Co. Clinton, New Jersey Michael P. Redlich (908) 730-3416 michael.p.redlich@exxonmobil.com About Myself Degree B.S.

More information

CISC 322 Software Architecture

CISC 322 Software Architecture CISC 322 Software Architecture Lecture 14: Design Patterns Emad Shihab Material drawn from [Gamma95, Coplien95] Slides adapted from Spiros Mancoridis and Ahmed E. Hassan Motivation Good designers know

More information

Design patterns. Valentina Presutti courtesy of Paolo Ciancarini

Design patterns. Valentina Presutti courtesy of Paolo Ciancarini Design patterns Valentina Presutti courtesy of Paolo Ciancarini Agenda What are design patterns? Catalogues of patterns Languages of patterns Two case studies: design with patterns Software Architectures

More information

Introduction and History

Introduction and History Pieter van den Hombergh Fontys Hogeschool voor Techniek en Logistiek September 15, 2016 Content /FHTenL September 15, 2016 2/28 The idea is quite old, although rather young in SE. Keep up a roof. /FHTenL

More information

Slide 1. Design Patterns. Prof. Mirco Tribastone, Ph.D

Slide 1. Design Patterns. Prof. Mirco Tribastone, Ph.D Slide 1 Design Patterns Prof. Mirco Tribastone, Ph.D. 22.11.2011 Introduction Slide 2 Basic Idea The same (well-established) schema can be reused as a solution to similar problems. Muster Abstraktion Anwendung

More information

Course "Softwaretechnik" Book Chapter 8 Object Design: Reuse and Patterns

Course Softwaretechnik Book Chapter 8 Object Design: Reuse and Patterns Course "Softwaretechnik" Book Chapter 8 Object Design: Reuse and Patterns Lutz Prechelt, Bernd Bruegge, Allen H. Dutoit Freie Universität Berlin, Institut für Informatik http://www.inf.fu-berlin.de/inst/ag-se/

More information

Design Patterns. An introduction

Design Patterns. An introduction Design Patterns An introduction Introduction Designing object-oriented software is hard, and designing reusable object-oriented software is even harder. Your design should be specific to the problem at

More information

6.3 Patterns. Definition: Design Patterns

6.3 Patterns. Definition: Design Patterns Subject/Topic/Focus: Analysis and Design Patterns Summary: What is a pattern? Why patterns? 6.3 Patterns Creational, structural and behavioral patterns Examples: Abstract Factory, Composite, Chain of Responsibility

More information

Facade and Adapter. Comp-303 : Programming Techniques Lecture 19. Alexandre Denault Computer Science McGill University Winter 2004

Facade and Adapter. Comp-303 : Programming Techniques Lecture 19. Alexandre Denault Computer Science McGill University Winter 2004 Facade and Adapter Comp-303 : Programming Techniques Lecture 19 Alexandre Denault Computer Science McGill University Winter 2004 March 23, 2004 Lecture 19 Comp 303 : Facade and Adapter Page 1 Last lecture...

More information

Design Patterns. Gunnar Gotshalks A4-1

Design Patterns. Gunnar Gotshalks A4-1 Design Patterns A4-1 On Design Patterns A design pattern systematically names, explains and evaluates an important and recurring design problem and its solution Good designers know not to solve every problem

More information

Ingegneria del Software Corso di Laurea in Informatica per il Management. Design Patterns part 1

Ingegneria del Software Corso di Laurea in Informatica per il Management. Design Patterns part 1 Ingegneria del Software Corso di Laurea in Informatica per il Management Design Patterns part 1 Davide Rossi Dipartimento di Informatica Università di Bologna Pattern Each pattern describes a problem which

More information

Object-Oriented Oriented Programming

Object-Oriented Oriented Programming Object-Oriented Oriented Programming Composite Pattern CSIE Department, NTUT Woei-Kae Chen Catalog of Design patterns Creational patterns Abstract Factory, Builder, Factory Method, Prototype, Singleton

More information

Object Oriented Programming. Michał Bereta

Object Oriented Programming. Michał Bereta Object Oriented Programming Michał Bereta www.michalbereta.pl mbereta@pk.edu.pl Time and place Thursday, 18:00 20:15 Classroom 142 Institute of Informatics Warszawska street (Faculty of chemistry building)

More information

Design Patterns. Observations. Electrical Engineering Patterns. Mechanical Engineering Patterns

Design Patterns. Observations. Electrical Engineering Patterns. Mechanical Engineering Patterns Introduction o to Patterns and Design Patterns Dept. of Computer Science Baylor University Some slides adapted from slides by R. France and B. Tekinerdogan Observations Engineering=Problem Solving Many

More information

Object Oriented Methods with UML. Introduction to Design Patterns- Lecture 8

Object Oriented Methods with UML. Introduction to Design Patterns- Lecture 8 Object Oriented Methods with UML Introduction to Design Patterns- Lecture 8 Topics(03/05/16) Design Patterns Design Pattern In software engineering, a design pattern is a general repeatable solution to

More information

Applying the Observer Design Pattern

Applying the Observer Design Pattern Applying the Observer Design Pattern Trenton Computer Festival Professional Seminars Michael P. Redlich (908) 730-3416 michael.p.redlich@exxonmobil.com About Myself Degree B.S. in Computer Science Rutgers

More information

CSCD01 Engineering Large Software Systems. Design Patterns. Joe Bettridge. Winter With thanks to Anya Tafliovich

CSCD01 Engineering Large Software Systems. Design Patterns. Joe Bettridge. Winter With thanks to Anya Tafliovich CSCD01 Engineering Large Software Systems Design Patterns Joe Bettridge Winter 2018 With thanks to Anya Tafliovich Design Patterns Design patterns take the problems consistently found in software, and

More information

Introduction to Software Engineering: Object Design I Reuse & Patterns

Introduction to Software Engineering: Object Design I Reuse & Patterns Introduction to Software Engineering: Object Design I Reuse & Patterns John T. Bell Department of Computer Science University of Illinois, Chicago Based on materials from Bruegge & DuToit 3e, Chapter 8,

More information

Design patterns are partial solutions to common

Design patterns are partial solutions to common Design Patterns Page 497 Thursday, October 14, 1999 2:35 PM A P P E N D I X A Design Patterns Design patterns are partial solutions to common problems, such as separating an interface from a number of

More information

Tuesday, October 4. Announcements

Tuesday, October 4. Announcements Tuesday, October 4 Announcements www.singularsource.net Donate to my short story contest UCI Delta Sigma Pi Accepts business and ICS students See Facebook page for details Slide 2 1 Design Patterns Design

More information

Idioms and Design Patterns. Martin Skogevall IDE, Mälardalen University

Idioms and Design Patterns. Martin Skogevall IDE, Mälardalen University Idioms and Design Patterns Martin Skogevall IDE, Mälardalen University 2005-04-07 Acronyms Object Oriented Analysis and Design (OOAD) Object Oriented Programming (OOD Software Design Patterns (SDP) Gang

More information

As a programmer, you know how easy it can be to get lost in the details

As a programmer, you know how easy it can be to get lost in the details Chapter 1 Congratulations, Your Problem Has Already Been Solved In This Chapter Introducing design patterns Knowing how design patterns can help Extending object-oriented programming Taking a look at some

More information

Applying the Decorator Design Pattern

Applying the Decorator Design Pattern Applying the Decorator Design Pattern Trenton Computer Festival Professional Seminars Michael P. Redlich (908) 730-3416 michael.p.redlich@exxonmobil.com About Myself Degree B.S. in Computer Science Rutgers

More information

Design Patterns. Definition of a Design Pattern

Design Patterns. Definition of a Design Pattern Design Patterns Barbara Russo Definition of a Design Pattern A Pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem,

More information

Software Engineering Prof. Rushikesh K.Joshi IIT Bombay Lecture-15 Design Patterns

Software Engineering Prof. Rushikesh K.Joshi IIT Bombay Lecture-15 Design Patterns Software Engineering Prof. Rushikesh K.Joshi IIT Bombay Lecture-15 Design Patterns Today we are going to talk about an important aspect of design that is reusability of design. How much our old design

More information

Design patterns. OOD Lecture 6

Design patterns. OOD Lecture 6 Design patterns OOD Lecture 6 Next lecture Monday, Oct 1, at 1:15 pm, in 1311 Remember that the poster sessions are in two days Thursday, Sep 27 1:15 or 3:15 pm (check which with your TA) Room 2244 + 2245

More information

Plan. Design principles: laughing in the face of change. What kind of change? What are we trying to achieve?

Plan. Design principles: laughing in the face of change. What kind of change? What are we trying to achieve? Plan Design principles: laughing in the face of change Perdita Stevens School of Informatics University of Edinburgh What are we trying to achieve? Review: Design principles you know from Inf2C-SE Going

More information

An Introduction to Patterns

An Introduction to Patterns An Introduction to Patterns Robert B. France Colorado State University Robert B. France 1 What is a Pattern? Patterns are intended to capture the best available software development experiences in the

More information

Design Patterns 2. Page 1. Software Requirements and Design CITS 4401 Lecture 10. Proxy Pattern: Motivation. Proxy Pattern.

Design Patterns 2. Page 1. Software Requirements and Design CITS 4401 Lecture 10. Proxy Pattern: Motivation. Proxy Pattern. Proxy : Motivation Design s 2 It is 3pm. I am sitting at my 10Mbps connection and go to browse a fancy web page from the US, This is prime web time all over the US. So I am getting 100kbps What can you

More information

Chapter 11, Testing, Part 2: Integration and System Testing

Chapter 11, Testing, Part 2: Integration and System Testing Object-Oriented Software Engineering Using UML, Patterns, and Java Chapter 11, Testing, Part 2: Integration and System Testing Overview Integration testing Big bang Bottom up Top down Sandwich System testing

More information

MVC. Model-View-Controller. Design Patterns. Certain programs reuse the same basic structure or set of ideas

MVC. Model-View-Controller. Design Patterns. Certain programs reuse the same basic structure or set of ideas MVC -- Design Patterns Certain programs reuse the same basic structure or set of ideas These regularly occurring structures have been called Design Patterns Design Patterns Design Patterns: Elements of

More information

be used for more than one use case (for instance, for use cases Create User and Delete User, one can have one UserController, instead of two separate

be used for more than one use case (for instance, for use cases Create User and Delete User, one can have one UserController, instead of two separate UNIT 4 GRASP GRASP: Designing objects with responsibilities Creator Information expert Low Coupling Controller High Cohesion Designing for visibility - Applying GoF design patterns adapter, singleton,

More information

Applying the Factory Method Design Pattern

Applying the Factory Method Design Pattern Applying the Factory Method Design Pattern Trenton Computer Festival Professional Seminars Michael P. Redlich (908) 730-3416 michael.p.redlich@exxonmobil.com About Myself Degree B.S. in Computer Science

More information

Ingegneria del Software Corso di Laurea in Informatica per il Management. Design Patterns part 1

Ingegneria del Software Corso di Laurea in Informatica per il Management. Design Patterns part 1 Ingegneria del Software Corso di Laurea in Informatica per il Management Design Patterns part 1 Davide Rossi Dipartimento di Informatica Università di Bologna Pattern Each pattern describes a problem which

More information

Design Patterns. Dr. Rania Khairy. Software Engineering and Development Tool

Design Patterns. Dr. Rania Khairy. Software Engineering and Development Tool Design Patterns What are Design Patterns? What are Design Patterns? Why Patterns? Canonical Cataloging Other Design Patterns Books: Freeman, Eric and Elisabeth Freeman with Kathy Sierra and Bert Bates.

More information

Chapter 5, Analysis: Object Modeling

Chapter 5, Analysis: Object Modeling Chapter 5, Analysis: Object Modeling Résumé Maintenant: Modélisation des objets du domaine La partie statique (diagramme de classe) Les activités durant la modélisation des objets L identification des

More information

DESIGN PATTERN - INTERVIEW QUESTIONS

DESIGN PATTERN - INTERVIEW QUESTIONS DESIGN PATTERN - INTERVIEW QUESTIONS http://www.tutorialspoint.com/design_pattern/design_pattern_interview_questions.htm Copyright tutorialspoint.com Dear readers, these Design Pattern Interview Questions

More information

Chapter 8, Design Patterns Visitor

Chapter 8, Design Patterns Visitor Chapter 8, Design Patterns Visitor Using UML, Patterns, and Java Object-Oriented Software Engineering Pattern A Pattern Taxonomy Structural Pattern Behavioral Pattern Creational Pattern Composite Decorator

More information

An Introduction to Patterns

An Introduction to Patterns An Introduction to Patterns Robert B. France Colorado State University Robert B. France 1 What is a Pattern? - 1 Work on software development patterns stemmed from work on patterns from building architecture

More information

Chapter 5, Analysis: Dynamic Modeling

Chapter 5, Analysis: Dynamic Modeling Object-Oriented Software Engineering Using UML, Patterns, and Java Chapter 5, Analysis: Dynamic Modeling ü Requirements Elicitation (Ch.4) ü Introduction (Ch 1-3) OOSE- Galaxy ü Nonfunctional Requirements

More information

L18.1 Introduction... 2

L18.1 Introduction... 2 Department of Computer Science COS121 Lecture Notes: L18 Iterator Design Pattern 8 September 2014 Copyright c 2014 by Linda Marshall and Vreda Pieterse. All rights reserved. Contents L18.1 Introduction.................................

More information

Summary of the course lectures

Summary of the course lectures Summary of the course lectures 1 Components and Interfaces Components: Compile-time: Packages, Classes, Methods, Run-time: Objects, Invocations, Interfaces: What the client needs to know: Syntactic and

More information

Modellistica Medica. Maria Grazia Pia, INFN Genova. Scuola di Specializzazione in Fisica Sanitaria Genova Anno Accademico

Modellistica Medica. Maria Grazia Pia, INFN Genova. Scuola di Specializzazione in Fisica Sanitaria Genova Anno Accademico Modellistica Medica Maria Grazia Pia INFN Genova Scuola di Specializzazione in Fisica Sanitaria Genova Anno Accademico 2002-2003 Lezione 8 OO modeling Design Patterns Introduction Creational Patterns Software

More information

Software Engineering Fall 2015 (CSC 4350/6350) TR. 5:30 pm 7:15 pm. Rao Casturi 09/29/2015

Software Engineering Fall 2015 (CSC 4350/6350) TR. 5:30 pm 7:15 pm. Rao Casturi 09/29/2015 Software Engineering Fall 2015 (CSC 4350/6350) TR. 5:30 pm 7:15 pm Rao Casturi 09/29/2015 http://cs.gsu.edu/~ncasturi1 Class Announcements Grading is done for the Deliverable #2 (Requirement Elicitation)

More information

Design Patterns. Hausi A. Müller University of Victoria. Software Architecture Course Spring 2000

Design Patterns. Hausi A. Müller University of Victoria. Software Architecture Course Spring 2000 Design Patterns Hausi A. Müller University of Victoria Software Architecture Course Spring 2000 1 Motivation Vehicle for reasoning about design or architecture at a higher level of abstraction (design

More information

administrivia today UML start design patterns Tuesday, September 28, 2010

administrivia today UML start design patterns Tuesday, September 28, 2010 administrivia Assignment 2? promise to get past assignment 1 back soon exam on monday review slides are posted your responsibility to review covers through last week today UML start design patterns 1 Unified

More information

Software Engineering I (02161)

Software Engineering I (02161) Software Engineering I (02161) Week 10 Assoc. Prof. Hubert Baumeister DTU Compute Technical University of Denmark Spring 2016 Last Time Project Planning Non-agile Agile Refactoring Contents Basic Principles

More information

Design Patterns. CSC207 Fall 2017

Design Patterns. CSC207 Fall 2017 Design Patterns CSC207 Fall 2017 Design Patterns A design pattern is a general description of the solution to a well-established problem using an arrangement of classes and objects. Patterns describe the

More information

Chapter 11, Testing, Part 2: Integration and System Testing

Chapter 11, Testing, Part 2: Integration and System Testing Object-Oriented Software Engineering Using UML, Patterns, and Java Chapter 11, Testing, Part 2: Integration and System Testing Overview Integration testing Big bang Bottom up Top down Sandwich System testing

More information

Object-Oriented Software Engineering Conquering Complex and Changing Systems. Chapter 6, System Design Lecture 1

Object-Oriented Software Engineering Conquering Complex and Changing Systems. Chapter 6, System Design Lecture 1 Object-Oriented Software Engineering Conquering Complex and Changing Systems Chapter 6, System Design Lecture 1 Design There are two ways of constructing a software design: One way is to make it so simple

More information

Object-Oriented Design

Object-Oriented Design Object-Oriented Design Lecturer: Raman Ramsin Lecture 20: GoF Design Patterns Creational 1 Software Patterns Software Patterns support reuse of software architecture and design. Patterns capture the static

More information

Chapter 12 (revised by JAS)

Chapter 12 (revised by JAS) Chapter 12 (revised by JAS) Pattern-Based Design Slide Set to accompany Software Engineering: A Practitionerʼs Approach, 7/e by Roger S. Pressman Slides copyright 1996, 2001, 2005, 2009 by Roger S. Pressman

More information

Design Patterns. CSC207 Winter 2017

Design Patterns. CSC207 Winter 2017 Design Patterns CSC207 Winter 2017 Design Patterns A design pattern is a general description of the solution to a well-established problem using an arrangement of classes and objects. Patterns describe

More information

Software Eningeering. Lecture 9 Design Patterns 2

Software Eningeering. Lecture 9 Design Patterns 2 Software Eningeering Lecture 9 Design Patterns 2 Patterns covered Creational Abstract Factory, Builder, Factory Method, Prototype, Singleton Structural Adapter, Bridge, Composite, Decorator, Facade, Flyweight,

More information

Design patterns generic models

Design patterns generic models Design patterns generic models Jyothish Maniyath CDC Software India Pvt Ltd 6 th Floor, Canberra Block, UB City, #24 Vittal Mallya Road, Bangalore, India +91 94482 46718 jyosh@maniyath.com ABSTRACT This

More information

Design Patterns Lecture 2

Design Patterns Lecture 2 Design Patterns Lecture 2 Josef Hallberg josef.hallberg@ltu.se 1 Patterns covered Creational Abstract Factory, Builder, Factory Method, Prototype, Singleton Structural Adapter, Bridge, Composite, Decorator,

More information

Crash course on design patterns

Crash course on design patterns Crash course on design patterns Yann-Gaël Guéhéneuc guehene@emn.fr From Olivier Motelet s course (2001/10/17) École des Mines de Nantes, France Object Technology International, Inc., Canada Design patterns

More information

Goals of Lecture. Lecture 27: OO Design Patterns. Pattern Resources. Design Patterns. Cover OO Design Patterns. Pattern Languages of Programming

Goals of Lecture. Lecture 27: OO Design Patterns. Pattern Resources. Design Patterns. Cover OO Design Patterns. Pattern Languages of Programming Goals of Lecture Lecture 27: OO Design Patterns Cover OO Design Patterns Background Examples Kenneth M. Anderson Object-Oriented Analysis and Design CSCI 6448 - Spring Semester, 2001 April 24, 2001 Kenneth

More information

LECTURE NOTES ON DESIGN PATTERNS MCA III YEAR, V SEMESTER (JNTUA-R09)

LECTURE NOTES ON DESIGN PATTERNS MCA III YEAR, V SEMESTER (JNTUA-R09) LECTURE NOTES ON DESIGN PATTERNS MCA III YEAR, V SEMESTER (JNTUA-R09) Mr. B KRISHNA MURTHI M.TECH, MISTE. Assistant Professor DEPARTMENT OF MASTER OF COMPUTER APPLICATIONS CHADALAWADA RAMANAMMA ENGINEERING

More information

Acknowledgements. Materials were borrowed from

Acknowledgements. Materials were borrowed from Composite Design Pattern The composite pattern allows clients to treat either individual objects or collections of objects in a uniform manner; this is a structural design pattern For example, an operating

More information

Information systems modelling UML and service description languages

Information systems modelling UML and service description languages Internet Engineering Tomasz Babczyński, Zofia Kruczkiewicz Tomasz Kubik Information systems modelling UML and service description languages Overview of design patterns for supporting information systems

More information

The following topics will be covered in this course (not necessarily in this order).

The following topics will be covered in this course (not necessarily in this order). The following topics will be covered in this course (not necessarily in this order). Introduction The course focuses on systematic design of larger object-oriented programs. We will introduce the appropriate

More information

2.1 Design Patterns and Architecture (continued)

2.1 Design Patterns and Architecture (continued) MBSE - 2.1 Design Patterns and Architecture 1 2.1 Design Patterns and Architecture (continued) 1. Introduction 2. Model Construction 2.1 Design Patterns and Architecture 2.2 State Machines 2.3 Timed Automata

More information

2.1 Design Patterns and Architecture (continued)

2.1 Design Patterns and Architecture (continued) MBSE - 2.1 Design Patterns and Architecture 1 2.1 Design Patterns and Architecture (continued) 1. Introduction 2. Model Construction 2.1 Design Patterns and Architecture 2.2 State Machines 2.3 Abstract

More information

CSCD01 Engineering Large Software Systems. Design Patterns. Joe Bettridge. Winter With thanks to Anya Tafliovich

CSCD01 Engineering Large Software Systems. Design Patterns. Joe Bettridge. Winter With thanks to Anya Tafliovich CSCD01 Engineering Large Software Systems Design Patterns Joe Bettridge Winter 2018 With thanks to Anya Tafliovich Design Patterns Design patterns take the problems consistently found in software, and

More information

APPLYING DESIGN PATTERNS TO SCA IMPLEMENTATIONS

APPLYING DESIGN PATTERNS TO SCA IMPLEMENTATIONS APPLYING DESIGN PATTERNS TO SCA IMPLEMENTATIONS Adem Zumbul (TUBITAK-UEKAE, Kocaeli, Turkey, ademz@uekae.tubitak.gov.tr); Tuna Tugcu (Bogazici University, Istanbul, Turkey, tugcu@boun.edu.tr) ABSTRACT

More information

Plan. Design principles: laughing in the face of change. What kind of change? What are we trying to achieve?

Plan. Design principles: laughing in the face of change. What kind of change? What are we trying to achieve? Plan Design principles: laughing in the face of change Perdita Stevens School of Informatics University of Edinburgh What are we trying to achieve? Review: Design principles you know from Inf2C-SE Going

More information

L23.1 Introduction... 2

L23.1 Introduction... 2 Department of Computer Science COS121 Lecture Notes: L23 Adapter Design Pattern 23 & 26 September 2014 Copyright c 2014 by Linda Marshall and Vreda Pieterse. All rights reserved. Contents L23.1 Introduction.................................

More information

Software Engineering Fall 2015 (CSC 4350/6350) TR. 5:30 pm 7:15 pm. Rao Casturi 11/03/2015

Software Engineering Fall 2015 (CSC 4350/6350) TR. 5:30 pm 7:15 pm. Rao Casturi 11/03/2015 Software Engineering Fall 2015 (CSC 4350/6350) TR. 5:30 pm 7:15 pm Rao Casturi 11/03/2015 http://cs.gsu.edu/~ncasturi1 Object Design Software Engineering -CSC4350/6350 - Rao Casturi 2 Object Design Close

More information

Chapter 4 Requirements Elicitation

Chapter 4 Requirements Elicitation Object-Oriented Software Engineering Using UML, Patterns, and Java Chapter 4 Requirements Elicitation Outline Today: Motivation: Software Lifecycle Requirements elicitation challenges Problem statement

More information

Design Patterns. Bernd Bruegge. Carnegie Mellon University Department of Computer Science 15 October 1998

Design Patterns. Bernd Bruegge. Carnegie Mellon University Department of Computer Science 15 October 1998 15-413 Design Patterns Bernd Bruegge 2 Carnegie Mellon University Department of Computer Science 15 October 1998 Bernd Bruegge SS 98 Component Based Software Engineering 1 Outline of the Lecture Design

More information

Design Patterns. "Gang of Four"* Design Patterns. "Gang of Four" Design Patterns. Design Pattern. CS 247: Software Engineering Principles

Design Patterns. Gang of Four* Design Patterns. Gang of Four Design Patterns. Design Pattern. CS 247: Software Engineering Principles CS 247: Software Engineering Principles Design Patterns Reading: Freeman, Robson, Bates, Sierra, Head First Design Patterns, O'Reilly Media, Inc. 2004 Ch Strategy Pattern Ch 7 Adapter and Facade patterns

More information

Adapter pattern. Acknowledgement: Freeman & Freeman

Adapter pattern. Acknowledgement: Freeman & Freeman Adapter pattern Acknowledgement: Freeman & Freeman Example Scenario The European wall outlet exposes one interface for getting power The adapter converts one interface into another The US laptop expects

More information

CS 247: Software Engineering Principles. Design Patterns

CS 247: Software Engineering Principles. Design Patterns CS 247: Software Engineering Principles Design Patterns Reading: Freeman, Robson, Bates, Sierra, Head First Design Patterns, O'Reilly Media, Inc. 2004 Ch 1 Strategy Pattern Ch 7 Adapter and Facade patterns

More information

Software Design Patterns. Background 1. Background 2. Jonathan I. Maletic, Ph.D.

Software Design Patterns. Background 1. Background 2. Jonathan I. Maletic, Ph.D. Software Design Patterns Jonathan I. Maletic, Ph.D. Department of Computer Science Kent State University J. Maletic 1 Background 1 Search for recurring successful designs emergent designs from practice

More information

Chapter 6 System Design: Decomposing the System

Chapter 6 System Design: Decomposing the System Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 6 System Design: Decomposing the System Requirements Elicitation & Analysis results in; Non-functional requirements and constraints

More information

THOMAS LATOZA SWE 621 FALL 2018 DESIGN PATTERNS

THOMAS LATOZA SWE 621 FALL 2018 DESIGN PATTERNS THOMAS LATOZA SWE 621 FALL 2018 DESIGN PATTERNS LOGISTICS HW3 due today HW4 due in two weeks 2 IN CLASS EXERCISE What's a software design problem you've solved from an idea you learned from someone else?

More information

Software Engineering Fall 2014

Software Engineering Fall 2014 Software Engineering Fall 2014 (CSC 4350/6350) Mon.- Wed. 5:30 pm 7:15 pm ALC : 107 Rao Casturi 11/03/2014 Re Cap - Object Design Close the gap between the application objects and the off-the shelf components.

More information

Chapter 5, Analysis: Dynamic Modeling

Chapter 5, Analysis: Dynamic Modeling Object-Oriented Software Engineering Using UML, Patterns, and Java Chapter 5, Analysis: Dynamic Modeling ü Requirements Elicitation (Ch.4) ü Introduction (Ch 1-3) OOSE- Galaxy ü Nonfunctional Requirements

More information

Page 1. Dynamic Modeling. How do you find classes? Dynamic Modeling with UML. UML Interaction Diagrams. UML State Chart Diagram.

Page 1. Dynamic Modeling. How do you find classes? Dynamic Modeling with UML. UML Interaction Diagrams. UML State Chart Diagram. Dynamic Modeling How do you find classes? We have already established several sources for class identification: Application domain analysis: We find classes by talking to the client and identify abstractions

More information

SOFTWARE ENGINEERING SOFTWARE DESIGN. Saulius Ragaišis.

SOFTWARE ENGINEERING SOFTWARE DESIGN. Saulius Ragaišis. SOFTWARE ENGINEERING SOFTWARE DESIGN Saulius Ragaišis saulius.ragaisis@mif.vu.lt CSC2008 SE Software Design Learning Objectives: Discuss the properties of good software design including the nature and

More information

Software Engineering - I An Introduction to Software Construction Techniques for Industrial Strength Software

Software Engineering - I An Introduction to Software Construction Techniques for Industrial Strength Software Software Engineering - I An Introduction to Software Construction Techniques for Industrial Strength Software Chapter 9 Introduction to Design Patterns Copy Rights Virtual University of Pakistan 1 Design

More information

An Expert System for Design Patterns Recognition

An Expert System for Design Patterns Recognition IJCSNS International Journal of Computer Science and Network Security, VOL.17 No.1, January 2017 93 An Expert System for Design Patterns Recognition Omar AlSheikSalem 1 and Hazem Qattous 2 1 Department

More information

Patterns. Erich Gamma Richard Helm Ralph Johnson John Vlissides

Patterns. Erich Gamma Richard Helm Ralph Johnson John Vlissides Patterns Patterns Pattern-based engineering: in the field of (building) architecting and other disciplines from 1960 s Some software engineers also started to use the concepts Become widely known in SE

More information

Details of Class Definition

Details of Class Definition Schedule(2/2) Feb. 25th 13:00 Outline of UML: Static Modeling (details of class definition) 14:30 Outline of UML: Dynamic Modeling (state machine, communication diagram, sequence diagram) March. 4th 13:00

More information

The GoF Design Patterns Reference

The GoF Design Patterns Reference The GoF Design Patterns Reference Version.0 / 0.0.07 / Printed.0.07 Copyright 0-07 wsdesign. All rights reserved. The GoF Design Patterns Reference ii Table of Contents Preface... viii I. Introduction....

More information

EMBEDDED SYSTEMS PROGRAMMING Design Patterns

EMBEDDED SYSTEMS PROGRAMMING Design Patterns EMBEDDED SYSTEMS PROGRAMMING 2015-16 Design Patterns DEFINITION Design pattern: solution to a recurring problem Describes the key elements of the problem and the solution in an abstract way Applicable

More information

Lecture 13: Design Patterns

Lecture 13: Design Patterns 1 Lecture 13: Design Patterns Kenneth M. Anderson Object-Oriented Analysis and Design CSCI 6448 - Spring Semester, 2005 2 Pattern Resources Pattern Languages of Programming Technical conference on Patterns

More information

Software Engineering Fall 2015 (CSC 4350/6350) TR. 5:30 pm 7:15 pm. Rao Casturi 09/17/2015

Software Engineering Fall 2015 (CSC 4350/6350) TR. 5:30 pm 7:15 pm. Rao Casturi 09/17/2015 Software Engineering Fall 2015 (CSC 4350/6350) TR. 5:30 pm 7:15 pm Rao Casturi 09/17/2015 http://cs.gsu.edu/~ncasturi1 Requirement Elicitation 2 Requirement Engineering First step for understanding the

More information

The Strategy Pattern Design Principle: Design Principle: Design Principle:

The Strategy Pattern Design Principle: Design Principle: Design Principle: Strategy Pattern The Strategy Pattern defines a family of algorithms, encapsulates each one, and makes them interchangeable. Strategy lets the algorithm vary independently from clients that use it. Design

More information

Advanced Object Oriented PHP

Advanced Object Oriented PHP CNM STEMulus Center Web Development with PHP November 11, 2015 1/17 Outline 1 2 Diamond Problem Composing vs Inheriting Case Study: Strategy Design Pattern 2/17 Definition is when a class is based on another

More information

Chapter 2, Modeling with UML, Part 2

Chapter 2, Modeling with UML, Part 2 Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 2, Modeling with UML, Part 2 Outline of this Class What is UML? A more detailed view on Use case diagrams Class diagrams Sequence

More information

Design Patterns (Facade, Composite)

Design Patterns (Facade, Composite) CS 247: Software Engineering Principles Design Patterns (Facade, Composite) Reading: Freeman, Robson, Bates, Sierra, Head First Design Patterns, O'Reilly Media, Inc. 2004 Ch 7 Adapter and Facade patterns

More information

Pattern Resources. Lecture 25: Design Patterns. What are Patterns? Design Patterns. Pattern Languages of Programming. The Portland Pattern Repository

Pattern Resources. Lecture 25: Design Patterns. What are Patterns? Design Patterns. Pattern Languages of Programming. The Portland Pattern Repository Pattern Resources Lecture 25: Design Patterns Kenneth M. Anderson Object-Oriented Analysis and Design CSCI 6448 - Spring Semester, 2003 Pattern Languages of Programming Technical conference on Patterns

More information

Design Pattern What is a Design Pattern? Design Pattern Elements. Almas Ansari Page 1

Design Pattern What is a Design Pattern? Design Pattern Elements. Almas Ansari Page 1 What is a Design Pattern? Each pattern Describes a problem which occurs over and over again in our environment,and then describes the core of the problem Novelists, playwrights and other writers rarely

More information

Design Patterns. CSC207 Fall 2017

Design Patterns. CSC207 Fall 2017 Design Patterns CSC207 Fall 2017 Design Patterns A design pattern is a general description of the solution to a well-established problem using an arrangement of classes and objects. Patterns describe the

More information

Recitation 13. Software Engineering Practices and Introduction to Design Patterns

Recitation 13. Software Engineering Practices and Introduction to Design Patterns Recitation 13 Software Engineering Practices and Introduction to Design Patterns Software Development is chaotic During that 90% time: Good engineers think, research, read the codebase, and recognize design

More information

Object Oriented Software Engineering Practical Software Development Using Uml And Java

Object Oriented Software Engineering Practical Software Development Using Uml And Java Object Oriented Software Engineering Practical Software Development Using Uml And Java We have made it easy for you to find a PDF Ebooks without any digging. And by having access to our ebooks online or

More information