Mac OS X and ios operating systems. Lecture 5 Design patterns. Tomasz Idzi

Size: px
Start display at page:

Download "Mac OS X and ios operating systems. Lecture 5 Design patterns. Tomasz Idzi"

Transcription

1 Lecture 5 Design patterns

2 What is it? reusable solutions clear code easy to develop

3 Descripion of pattern. what why how the design pattern is you should use it to use it

4 singleton abstract factory MVC decorator adapter facade composite observer memento chain of responsibility command

5 Model View Controller what why how the design pattern is you should use it to use it

6 what Model View Controller controller update notify update user actions model view

7 why Model View Controller better understanding Cocoa easy add new features use it in other projects

8 Model View Controller controller update notify update user actions model view

9 Model View Controller ViewController notify update update user actions Album AlbumView

10 what Singleton Manager +instance:manager +sharedinstance():manager -init():id

11 why Singleton global access

12 Singleton LibraryAPI +instance:libraryapi +sharedinstance():libraryapi -init():id

13 Singleton

14 what Facade API remote server database file system memory

15 why Facade single interface to a complex subsystem reduces dependencies of outside code easier to develop

16 Facade LibraryAPI HTTPClient Persistency Manager

17 Facade LibraryAPI HTTPClient Persistency Manager

18 what Decorator Obj-c category delegation

19 what Decorator category NewClass : NSString

20 what Decorator category NSString +NewClass.h NSString +NewClass.m

21 why Decorator category extend existing classes without subclassing replace existing method add methods to any of Cocoa s own classes

22 Decorator category

23 Decorator category

24 Decorator category

25 Decorator category

26 Decorator category titles Artist Album Genre Year values album.artist album.tittle album.genre album.year

27 Decorator category

28 what Decorator delegation ViewController UITableView tableview:numberofrowsinsection: return 4 tableview:cellforrowatindexpath: How many rows should I draw? for (int i=0;i<4;i++) What should I present for cell 1? return cell and so on...

29 why Decorator delegation changes in another object two objects coordinate to solve a problem

30 Decorator delegation MyCell MainViewController.h.m.m

31 what Adapter

32 what Adapter

33 what Adapter client <target> request adaptee request adapter request [adaptee specificrequest]

34 why Adapter different types of objects work together easy add new features use it in other projects

35 Adapter

36 Adapter HorizontalScroller.h

37 Adapter HorizontalScroller.m

38 Adapter HorizontalScroller.m

39 Adapter HorizontalScroller.m

40 Adapter HorizontalScroller.m

41 Adapter HorizontalScroller.m

42 Adapter

43 what Observer subject attachobserver:observer detachobserver:observer notify observer update ConcreteSubject getstate setstate:state subjectstate_ ConcreteObserver update observestate_

44 why Observer one object notifies other objects of any state change

45 Observer Notification Key-Value Observing (KVO)

46 Observer Notification AlbumView.m LibraryAPI.m

47 Observer Notification PresistencyManager.m

48 Observer Notification LibraryAPI.m

49 Observer Key-Value Observing (KVO) AlbumView.m

50 what Memento originator -state + SetMemento + CreateMemento memento - state + GetState + SetState memento caretaker

51 why Memento save and load app state whenever you want

52 Memento

53 what Command client invoker <Command> execute receiver action receiver ConcreteCommand execute [receiver action]

54 why Command app support undo/redo

55 Command

COSC 3351 Software Design. Design Patterns Behavioral Patterns (I)

COSC 3351 Software Design. Design Patterns Behavioral Patterns (I) COSC 3351 Software Design Design Patterns Behavioral Patterns (I) Spring 2008 Purpose Creational Structural Behavioral Scope Class Factory Method Adapter(class) Interpreter Template Method Object Abstract

More information

Brief Note on Design Pattern

Brief Note on Design Pattern Brief Note on Design Pattern - By - Channu Kambalyal channuk@yahoo.com This note is based on the well-known book Design Patterns Elements of Reusable Object-Oriented Software by Erich Gamma et., al.,.

More information

EMBEDDED SYSTEMS PROGRAMMING Design Patterns

EMBEDDED SYSTEMS PROGRAMMING Design Patterns EMBEDDED SYSTEMS PROGRAMMING 2014-15 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

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

Design Patterns Reid Holmes

Design Patterns Reid Holmes Material and some slide content from: - Head First Design Patterns Book - GoF Design Patterns Book Design Patterns Reid Holmes GoF design patterns $ %!!!! $ "! # & Pattern vocabulary Shared vocabulary

More information

CS 2720 Practical Software Development University of Lethbridge. Design Patterns

CS 2720 Practical Software Development University of Lethbridge. Design Patterns Design Patterns A design pattern is a general solution to a particular class of problems, that can be reused. They are applicable not just to design. You can think of patterns as another level of abstraction.

More information

Object Oriented. Analysis and Design

Object Oriented. Analysis and Design OODP- OOAD Session 5 Object Oriented Analysis and Design Oded Lachish Department of Computer Science and Information Systems Birkbeck College, University of London Email: oded@dcs.bbk.ac.uk Web Page: http://www.dcs.bbk.ac.uk/~oded

More information

Pro Objective-C Design Patterns for ios

Pro Objective-C Design Patterns for ios Pro Objective-C Design Patterns for ios Carlo Chung Contents Contents at a Glance About the Author About the Technical Reviewer Acknowledgments Preface x xi xii xiii Part I: Getting Your Feet Wet 1 Chapter

More information

Appendix-A. A.1 Catalogues of Design Patterns. Below is the definition for each design pattern using the FINDER notation, followed

Appendix-A. A.1 Catalogues of Design Patterns. Below is the definition for each design pattern using the FINDER notation, followed A Appendix-A A.1 Catalogues of Design Patterns Below is the definition for each design pattern using the FINDER notation, followed by a description of the rules. These definitions have been created using

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 9 OO modeling Design Patterns Structural Patterns Behavioural Patterns

More information

Lectures 24 and 25 Introduction to Architectural Styles and Design Patterns

Lectures 24 and 25 Introduction to Architectural Styles and Design Patterns Lectures 24 and 25 Introduction to Architectural Styles and Design Patterns Software Engineering ITCS 3155 Fall 2008 Dr. Jamie Payton Department of Computer Science University of North Carolina at Charlotte

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

Last Lecture. Lecture 17: Design Patterns (part 2) Kenneth M. Anderson Object-Oriented Analysis and Design CSCI 4448/ Spring Semester, 2005

Last Lecture. Lecture 17: Design Patterns (part 2) Kenneth M. Anderson Object-Oriented Analysis and Design CSCI 4448/ Spring Semester, 2005 1 Lecture 17: Design Patterns (part 2) Kenneth M. Anderson Object-Oriented Analysis and Design CSCI 4448/6448 - Spring Semester, 2005 2 Last Lecture Design Patterns Background and Core Concepts Examples

More information

Development and Implementation of Workshop Management System Application to Explore Combing Multiple Design Patterns

Development and Implementation of Workshop Management System Application to Explore Combing Multiple Design Patterns St. Cloud State University therepository at St. Cloud State Culminating Projects in Computer Science and Information Technology Department of Computer Science and Information Technology 5-2015 Development

More information

Design Pattern. CMPSC 487 Lecture 10 Topics: Design Patterns: Elements of Reusable Object-Oriented Software (Gamma, et al.)

Design Pattern. CMPSC 487 Lecture 10 Topics: Design Patterns: Elements of Reusable Object-Oriented Software (Gamma, et al.) Design Pattern CMPSC 487 Lecture 10 Topics: Design Patterns: Elements of Reusable Object-Oriented Software (Gamma, et al.) A. Design Pattern Design patterns represent the best practices used by experienced

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

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

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

COSC 3351 Software Design. Design Patterns Behavioral Patterns (II)

COSC 3351 Software Design. Design Patterns Behavioral Patterns (II) COSC 3351 Software Design Design Patterns Behavioral Patterns (II) Spring 2008 Purpose Creational Structural Behavioral Scope Class Factory Method Adapter(class) Interpreter Template Method Object Abstract

More information

CS 349 / SE 382 Design Patterns. Professor Michael Terry January 21, 2009

CS 349 / SE 382 Design Patterns. Professor Michael Terry January 21, 2009 CS 349 / SE 382 Design Patterns Professor Michael Terry January 21, 2009 Today s Agenda More demos! Design patterns CS 349 / SE 382 / 2 Announcements Assignment 1 due Monday at 5PM! CS 349 / SE 382 / 3

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

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

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

Design Patterns. Manuel Mastrofini. Systems Engineering and Web Services. University of Rome Tor Vergata June 2011

Design Patterns. Manuel Mastrofini. Systems Engineering and Web Services. University of Rome Tor Vergata June 2011 Design Patterns Lecture 1 Manuel Mastrofini Systems Engineering and Web Services University of Rome Tor Vergata June 2011 Definition A pattern is a reusable solution to a commonly occurring problem within

More information

Component ConcreateComponent Decorator ConcreateDecoratorA ConcreteDecoratorB

Component ConcreateComponent Decorator ConcreateDecoratorA ConcreteDecoratorB Comp435 Object-Oriented Design Week 12 Computer Science PSU HBG Attach additional responsibilities to an object dynamically Provide a flexible alternative to subclassing for extending functionality Attach

More information

CS560. Lecture: Design Patterns II Includes slides by E. Gamma et al., 1995

CS560. Lecture: Design Patterns II Includes slides by E. Gamma et al., 1995 CS560 Lecture: Design Patterns II Includes slides by E. Gamma et al., 1995 Classification of GoF Design Pattern Creational Structural Behavioural Factory Method Adapter Interpreter Abstract Factory Bridge

More information

Egon Borger (Pisa) Capturing Design Pattern Abstractions by ASMs

Egon Borger (Pisa) Capturing Design Pattern Abstractions by ASMs Egon Borger (Pisa) Capturing Design Pattern Abstractions by ASMs Universita di Pisa, Dipartimento di Informatica, I-56127 Pisa, Italy boerger@di.unipi.it visiting SAP Research, Karlsruhe, Germany egon.boerger@sap.com

More information

Announcements. Today s Topics

Announcements. Today s Topics Announcements Lab 2 is due tonight by 11:59 PM Late policy is 10% of lab total per day late So -7.5 points per day late for lab 2 Labs 3 and 4 are posted on the course website Extensible Networking Platform

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

I, J. Key-value observing (KVO), Label component, 32 text property, 39

I, J. Key-value observing (KVO), Label component, 32 text property, 39 Index A Abstract factory pattern, 207 concrete factory, 213 examples in Cocoa, 227 groups of objects, 212 implementing, 213 abstract factories, 214 concrete factories, 214 215 operations, 212 213 pitfalls,

More information

Design pa*erns. Based on slides by Glenn D. Blank

Design pa*erns. Based on slides by Glenn D. Blank Design pa*erns Based on slides by Glenn D. Blank Defini6ons A pa#ern is a recurring solu6on to a standard problem, in a context. Christopher Alexander, a professor of architecture Why would what a prof

More information

TDDB84: Lecture 6. Adapter, Bridge, Observer, Chain of Responsibility, Memento, Command. fredag 4 oktober 13

TDDB84: Lecture 6. Adapter, Bridge, Observer, Chain of Responsibility, Memento, Command. fredag 4 oktober 13 TDDB84: Lecture 6 Adapter, Bridge, Observer, Chain of Responsibility, Memento, Command Creational Abstract Factory Singleton Builder Structural Composite Proxy Bridge Adapter Template method Behavioral

More information

Design Patterns. Manuel Mastrofini. Systems Engineering and Web Services. University of Rome Tor Vergata June 2011

Design Patterns. Manuel Mastrofini. Systems Engineering and Web Services. University of Rome Tor Vergata June 2011 Design Patterns Lecture 2 Manuel Mastrofini Systems Engineering and Web Services University of Rome Tor Vergata June 2011 Structural patterns Part 2 Decorator Intent: It attaches additional responsibilities

More information

Design of Software Systems (Ontwerp van SoftwareSystemen) Design Patterns Reference. Roel Wuyts

Design of Software Systems (Ontwerp van SoftwareSystemen) Design Patterns Reference. Roel Wuyts Design of Software Systems (Ontwerp van SoftwareSystemen) Design Patterns Reference 2015-2016 Visitor See lecture on design patterns Design of Software Systems 2 Composite See lecture on design patterns

More information

Chapter 8, Object Design: Reusing Pattern Solutions

Chapter 8, Object Design: Reusing Pattern Solutions Object-Oriented Software Engineering Using UML, Patterns, and Java Chapter 8, Object Design: Reusing Pattern Solutions Application Objects and Solution Objects Application objects, also called domain objects,

More information

Design Patterns Reid Holmes

Design Patterns Reid Holmes Material and some slide content from: - Head First Design Patterns Book - GoF Design Patterns Book Design Patterns Reid Holmes GoF design patterns $ %!!!! $ "! # & Pattern vocabulary Shared vocabulary

More information

Refining the Observer Pattern: The Middle Observer Pattern

Refining the Observer Pattern: The Middle Observer Pattern Refining the Observer Pattern: The Middle Observer Pattern Pablo Iaría - iariap@sol.info.unlp.edu.ar Ulises Chesini - uliche@sol.info.unlp.edu.ar Abstract The refinement presented in this paper incorporates

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

CSC207H: Software Design Lecture 6

CSC207H: Software Design Lecture 6 CSC207H: Software Design Lecture 6 Wael Aboelsaadat wael@cs.toronto.edu http://ccnet.utoronto.ca/20075/csc207h1y/ Office: BA 4261 Office hours: R 5-7 Acknowledgement: These slides are based on material

More information

Object-oriented Software Design Patterns

Object-oriented Software Design Patterns Object-oriented Software Design Patterns Concepts and Examples Marcelo Vinícius Cysneiros Aragão marcelovca90@inatel.br Topics What are design patterns? Benefits of using design patterns Categories and

More information

Software Reengineering Refactoring To Patterns. Martin Pinzger Delft University of Technology

Software Reengineering Refactoring To Patterns. Martin Pinzger Delft University of Technology Software Reengineering Refactoring To Patterns Martin Pinzger Delft University of Technology Outline Introduction Design Patterns Refactoring to Patterns Conclusions 2 The Reengineering Life-Cycle (1)

More information

Design Patterns. (and anti-patterns)

Design Patterns. (and anti-patterns) Design Patterns (and anti-patterns) Design Patterns The Gang of Four defined the most common object-oriented patterns used in software. These are only the named ones Lots more variations exist Design 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

Observer Pattern. CS580 Advanced Software Engineering October 31, Yu Sun, Ph.D.

Observer Pattern. CS580 Advanced Software Engineering   October 31, Yu Sun, Ph.D. Observer Pattern CS580 Advanced Software Engineering http://cs356.yusun.io October 31, 2014 Yu Sun, Ph.D. http://yusun.io yusun@csupomona.edu Announcements Quiz 5 Singleton Pattern Abstract Factory Pattern

More information

Behavioral patterns. Command Iterator Observer Strategy Template method

Behavioral patterns. Command Iterator Observer Strategy Template method Designpatterns Behavioral patterns Command Iterator Observer Strategy Template method Command Invoker: asks the command to carry out the request @CommandPattern.Invoker Command: defines an interface for

More information

UNIT I Introduction to Design Patterns

UNIT I Introduction to Design Patterns SIDDHARTH GROUP OF INSTITUTIONS :: PUTTUR Siddharth Nagar, Narayanavanam Road 517583 QUESTION BANK (DESCRIPTIVE) Subject with Code : Design Patterns (16MC842) Year & Sem: III-MCA I-Sem Course : MCA Regulation:

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

Design Patterns. CSE870: Advanced Software Engineering (Design Patterns): Cheng

Design Patterns. CSE870: Advanced Software Engineering (Design Patterns): Cheng Design Patterns Acknowledgements Materials based on a number of sources D. Levine and D. Schmidt. Helm Gamma et al S. Konrad Motivation Developing software is hard Designing reusable software is more challenging

More information

DESIGN PATTERNS MOCK TEST DESIGN PATTERNS MOCK TEST II

DESIGN PATTERNS MOCK TEST DESIGN PATTERNS MOCK TEST II http://www.tutorialspoint.com DESIGN PATTERNS MOCK TEST Copyright tutorialspoint.com This section presents you various set of Mock Tests related to Design Patterns Framework. You can download these sample

More information

CSE870: Advanced Software Engineering (Cheng) 1

CSE870: Advanced Software Engineering (Cheng) 1 Design Patterns Acknowledgements Materials based on a number of sources D. Levine and D. Schmidt. Helm Gamma et al S. Konrad Motivation Developing software is hard Designing reusable software is more challenging

More information

Socket attaches to a Ratchet. 2) Bridge Decouple an abstraction from its implementation so that the two can vary independently.

Socket attaches to a Ratchet. 2) Bridge Decouple an abstraction from its implementation so that the two can vary independently. Gang of Four Software Design Patterns with examples STRUCTURAL 1) Adapter Convert the interface of a class into another interface clients expect. It lets the classes work together that couldn't otherwise

More information

A Reconnaissance on Design Patterns

A Reconnaissance on Design Patterns A Reconnaissance on Design Patterns M.Chaithanya Varma Student of computer science engineering, Sree Vidhyanikethan Engineering college, Tirupati, India ABSTRACT: In past decade, design patterns have been

More information

ITP 342 Mobile App Development. Model View Controller

ITP 342 Mobile App Development. Model View Controller ITP 342 Mobile App Development Model View Controller Design Patterns A reusable pattern to solve common issues that come up in software development NOT new syntax, but the way you design your program What

More information

Trusted Components. Reuse, Contracts and Patterns. Prof. Dr. Bertrand Meyer Dr. Karine Arnout

Trusted Components. Reuse, Contracts and Patterns. Prof. Dr. Bertrand Meyer Dr. Karine Arnout 1 Last update: 2 November 2004 Trusted Components Reuse, Contracts and Patterns Prof. Dr. Bertrand Meyer Dr. Karine Arnout 2 Lecture 5: Design patterns Agenda for today 3 Overview Benefits of 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

Design Patterns! Acknowledgements!

Design Patterns! Acknowledgements! Design Patterns! Acknowledgements! Materials based on a number of sources! D. Levine and D. Schmidt!. Helm! Gamma et al! S. Konrad! (Cheng) 1 Motivation! Developing software is hard! Designing reusable

More information

Dr. Xiaolin Hu. Review of last class

Dr. Xiaolin Hu. Review of last class Review of last class Design patterns Creational Structural Behavioral Abstract Factory Builder Factory Singleton etc. Adapter Bridge Composite Decorator Façade Proxy etc. Command Iterator Observer Strategy

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

Java Technologies. Lecture III. Valdas Rapševičius. Vilnius University Faculty of Mathematics and Informatics

Java Technologies. Lecture III. Valdas Rapševičius. Vilnius University Faculty of Mathematics and Informatics Preparation of the material was supported by the project Increasing Internationality in Study Programs of the Department of Computer Science II, project number VP1 2.2 ŠMM-07-K-02-070, funded by The European

More information

Last Lecture. Lecture 26: Design Patterns (part 2) State. Goals of Lecture. Design Patterns

Last Lecture. Lecture 26: Design Patterns (part 2) State. Goals of Lecture. Design Patterns Lecture 26: Design Patterns (part 2) Kenneth M. Anderson Object-Oriented Analysis and Design CSCI 6448 - Spring Semester, 2003 Last Lecture Design Patterns Background and Core Concepts Examples Singleton,

More information

EECS 4314 Advanced Software Engineering. Topic 04: Design Pattern Review Zhen Ming (Jack) Jiang

EECS 4314 Advanced Software Engineering. Topic 04: Design Pattern Review Zhen Ming (Jack) Jiang EECS 4314 Advanced Software Engineering Topic 04: Design Pattern Review Zhen Ming (Jack) Jiang Acknowledgement Some slides are adapted from Ahmed E. Hassan, Jonathan Ostroff, Spiros Mancoridis and Emad

More information

Lecture 17: Patterns Potpourri. Copyright W. Howden 1

Lecture 17: Patterns Potpourri. Copyright W. Howden 1 Lecture 17: Patterns Potpourri Copyright W. Howden 1 GOF Patterns GOF: Gamma, Helm, Johnson, Vlissides Design Patterns, Addison Wesley, 1995 Patterns we have seen so far Creational Patterns e.g. Factory,

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

Lecture 19: Introduction to Design Patterns

Lecture 19: Introduction to Design Patterns Lecture 19: Introduction to Design Patterns Software System Design and Implementation ITCS/ITIS 6112/8112 091 Fall 2008 Dr. Jamie Payton Department of Computer Science University of North Carolina at Charlotte

More information

Produced by. Design Patterns. MSc in Communications Software. Eamonn de Leastar

Produced by. Design Patterns. MSc in Communications Software. Eamonn de Leastar Design Patterns MSc in Communications Software Produced by Eamonn de Leastar (edeleastar@wit.ie) Department of Computing, Maths & Physics Waterford Institute of Technology http://www.wit.ie http://elearning.wit.ie

More information

Design Patterns: Structural and Behavioural

Design Patterns: Structural and Behavioural Design Patterns: Structural and Behavioural 3 April 2009 CMPT166 Dr. Sean Ho Trinity Western University See also: Vince Huston Review last time: creational Design patterns: Reusable templates for designing

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

Mobile Application Programming. Messaging and Delegation

Mobile Application Programming. Messaging and Delegation Mobile Application Programming Messaging and Delegation Color Chooser Color Chooser MFColorChooserView UIControl or UIView MFColorChooserWheelView UIControl MFColorChooserValueSliderView UIControl MFColorChooserAlphaSliderView

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 (II)

Design Patterns (II) Design Patterns (II) Design Pattern Space Defer object creation to another class Scope Class Object Defer object creation to another object Creational Factory Method Abstract Factory Builder Prototype

More information

UNIT-I. Introduction, Architectural Styles, Shared Information Systems

UNIT-I. Introduction, Architectural Styles, Shared Information Systems SIDDHARTH GROUP OF INSTITUTIONS :: PUTTUR Siddharth Nagar, Narayanavanam Road 517583 QUESTION BANK (DESCRIPTIVE) Subject with Code : SADP (13A05701) Year & Sem: IV-B.Tech & I-Sem Course & Branch: B.Tech

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

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

UNIT I Introduction to Design Patterns

UNIT I Introduction to Design Patterns SIDDHARTH GROUP OF INSTITUTIONS :: PUTTUR Siddharth Nagar, Narayanavanam Road 517583 QUESTION BANK (DESCRIPTIVE) Subject with Code : Design Patterns(9F00505c) Year & Sem: III-MCA I-Sem Course : MCA Regulation:

More information

EPL 603 TOPICS IN SOFTWARE ENGINEERING. Lab 6: Design Patterns

EPL 603 TOPICS IN SOFTWARE ENGINEERING. Lab 6: Design Patterns EPL 603 TOPICS IN SOFTWARE ENGINEERING Lab 6: Design Patterns Links to Design Pattern Material 1 http://www.oodesign.com/ http://www.vincehuston.org/dp/patterns_quiz.html Types of Design Patterns 2 Creational

More information

Applying Design Patterns to SCA Implementations

Applying Design Patterns to SCA Implementations Applying Design Patterns to SCA Implementations Adem ZUMBUL (TUBITAK-UEKAE, ademz@uekae.tubitak.gov.tr) Tuna TUGCU (Bogazici University, tugcu@boun.edu.tr) SDR Forum Technical Conference, 26-30 October

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

SDC Design patterns GoF

SDC Design patterns GoF SDC Design patterns GoF Design Patterns The design pattern concept can be viewed as an abstraction of imitating useful parts of other software products. The design pattern is a description of communicating

More information

2/12/15. Template Method. Design Patterns. In Swing s JComponent. Template Method. Where do template methods come from? Making Template Methods

2/12/15. Template Method. Design Patterns. In Swing s JComponent. Template Method. Where do template methods come from? Making Template Methods Design Patterns Template Method Problem: Some classes have a similar algorithm, but it is a little different for each class. Solution: Define the skeleton of the algorithm as a method in a superclass,

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

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

CPSC 427a: Object-Oriented Programming

CPSC 427a: Object-Oriented Programming CPSC 427a: Object-Oriented Programming Michael J. Fischer Lecture 22a November 17, 2011 CPSC 427a, Lecture 22a 1/20 CPSC 427a, Lecture 22a 2/20 CPSC 427a, Lecture 22a 3/20 General OO principles 1. Encapsulation

More information

Lecture 20: Design Patterns II

Lecture 20: Design Patterns II Lecture 20: Design Patterns II Software System Design and Implementation ITCS/ITIS 6112/8112 001 Fall 2008 Dr. Jamie Payton Department of Computer Science University of North Carolina at Charlotte Nov.

More information

Design Patterns and Frameworks Command

Design Patterns and Frameworks Command Design Patterns and Frameworks Command Oliver Haase Oliver Haase Emfra Command 1/13 Description Classification: Object-based behavioral pattern Purpose: Encapsulate a command as an object. Allows to dynamically

More information

Page 1. Chapter 8, Object Design: Design Patterns II. Recall: Why reusable Designs? Definitions. A Taxonomy of Design Patterns

Page 1. Chapter 8, Object Design: Design Patterns II. Recall: Why reusable Designs? Definitions. A Taxonomy of Design Patterns Object-Oriented Software Engineering Using UML, Patterns, and Java Chapter 8, Object Design: Design Patterns II Recall: Why reusable Designs? A design enables flexibility to change (reusability) minimizes

More information

Design Patterns. Observer Pattern*

Design Patterns. Observer Pattern* Design Patterns Observer Pattern* ebru@hacettepe.edu.tr ebruakcapinarsezer@gmail.com http://yunus.hacettepe.edu.tr/~ebru/ @ebru176 Kasım 2017 *revised from Observer Pattern, OOA&D, Rubal Gupta, CSPP, Winter

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

Course UML and Design Patterns of module Software Engineering and Design, version November 18, 2013.

Course UML and Design Patterns of module Software Engineering and Design, version November 18, 2013. The Observer Pattern Prof. Dr. Eric Dubuis Berner Fachhochschule, Engineering and Information Technology @ Biel Course UML and Design Patterns of module Software Engineering and Design, version November

More information

Design Patterns. GoF design patterns catalog

Design Patterns. GoF design patterns catalog Design Patterns GoF design patterns catalog OMT notations - classes OMT notation - relationships Inheritance - triangle Aggregation - diamond Acquaintance keeps a reference solid line with arrow Creates

More information

Course "UML and Design Patterns" of module "Software Engineering and Design", version November 2011

Course UML and Design Patterns of module Software Engineering and Design, version November 2011 The Observer Pattern Prof. Dr. Eric Dubuis Berner Fachhochschule, @ Biel Course "UML and Design Patterns" of module "Software Engineering and Design", version November 20 BFH/TI/Software Engineering and

More information

DESIGN PATTERNS FOR MERE MORTALS

DESIGN PATTERNS FOR MERE MORTALS DESIGN PATTERNS FOR MERE MORTALS Philip Japikse (@skimedic) skimedic@outlook.com www.skimedic.com/blog Microsoft MVP, ASPInsider, MCSD, MCDBA, CSM, CSP Consultant, Teacher, Writer Phil.About() Consultant,

More information

Advanced Topics in Software Engineering (02265) Ekkart Kindler

Advanced Topics in Software Engineering (02265) Ekkart Kindler Advanced Topics in Software Engineering (02265) IV. (Meta-) Modelling Frameworks 2 1. Motivation & Overview With MOF, we have: Modelling notation (EMOF / CMOF) Java API (JMI, EMF, etc) Instance model /

More information

SYLLABUS CHAPTER - 1 [SOFTWARE REUSE SUCCESS FACTORS] Reuse Driven Software Engineering is a Business

SYLLABUS CHAPTER - 1 [SOFTWARE REUSE SUCCESS FACTORS] Reuse Driven Software Engineering is a Business Contents i UNIT - I UNIT - II UNIT - III CHAPTER - 1 [SOFTWARE REUSE SUCCESS FACTORS] Software Reuse Success Factors. CHAPTER - 2 [REUSE-DRIVEN SOFTWARE ENGINEERING IS A BUSINESS] Reuse Driven Software

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

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

CSCI Object Oriented Design: Frameworks and Design Patterns George Blankenship. Frameworks and Design George Blankenship 1

CSCI Object Oriented Design: Frameworks and Design Patterns George Blankenship. Frameworks and Design George Blankenship 1 CSCI 6234 Object Oriented Design: Frameworks and Design Patterns George Blankenship Frameworks and Design George Blankenship 1 Background A class is a mechanisms for encapsulation, it embodies a certain

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

Lecture 4: Observer Pattern, Event Library and Componentization

Lecture 4: Observer Pattern, Event Library and Componentization Software Architecture Bertrand Meyer & Till Bay ETH Zurich, February-May 2008 Lecture 4: Observer Pattern, Event Library and Componentization Program overview Date Topic Who? last week Introduction; A

More information