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

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

SDC Design patterns GoF

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

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

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

Object-Oriented Design

Object-Oriented Oriented Programming

Design patterns. Jef De Smedt Beta VZW

Object Oriented Paradigm

Brief Note on Design Pattern

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

Object-oriented Software Design Patterns

Using Design Patterns in Java Application Development

Introduction to Software Engineering: Object Design I Reuse & Patterns

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

Keywords: Abstract Factory, Singleton, Factory Method, Prototype, Builder, Composite, Flyweight, Decorator.

Design Patterns. SE3A04 Tutorial. Jason Jaskolka

DESIGN PATTERN - INTERVIEW QUESTIONS

Topics in Object-Oriented Design Patterns

Design Patterns: Structural and Behavioural

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

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

Software Design COSC 4353/6353 D R. R A J S I N G H

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

Design Patterns. (and anti-patterns)

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

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

Composite Pattern. IV.4 Structural Pattern

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

Design Patterns. An introduction

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

Tuesday, October 4. Announcements

Design Patterns Reid Holmes

DESIGN PATTERNS MOCK TEST DESIGN PATTERNS MOCK TEST II

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

CSCI 253. Overview. The Elements of a Design Pattern. George Blankenship 1. Object Oriented Design: Iterator Pattern George Blankenship

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

DESIGN PATTERNS SURESH BABU M ASST PROFESSOR VJIT

Overview CS Kinds of Patterns. Design Pattern. Factory Pattern Rationale. Kinds of Factory Patterns

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

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

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

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

1 Software Architecture

UNIT I Introduction to Design Patterns

Design Patterns V Structural Design Patterns, 2

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

Applying Design Patterns to SCA Implementations

A Reconnaissance on Design Patterns

Application Architectures, Design Patterns

Applying the Observer Design Pattern

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

CS342: Software Design. November 21, 2017

An Introduction to Patterns

Applying Design Patterns to accelerate development of reusable, configurable and portable UVCs. Accellera Systems Initiative 1

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

UNIT I Introduction to Design Patterns

Lecture 17: Patterns Potpourri. Copyright W. Howden 1

What is Design Patterns?

Lecture 20: Design Patterns II

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

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

Object-Oriented Design

Applying the Decorator Design Pattern

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

Software Eningeering. Lecture 9 Design Patterns 2

Design Patterns Lecture 2

A few important patterns and their connections

Plan. A few important patterns and their connections. Singleton. Singleton: class diagram. Singleton Factory method Facade

THOMAS LATOZA SWE 621 FALL 2018 DESIGN PATTERNS

INSTITUTE OF AERONAUTICAL ENGINEERING

C++ for System Developers with Design Pattern

APPLYING DESIGN PATTERNS TO SCA IMPLEMENTATIONS

The Design Patterns Matrix From Analysis to Implementation

Review Software Engineering October, 7, Adrian Iftene

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

Factory Method. Comp435 Object-Oriented Design. Factory Method. Factory Method. Factory Method. Factory Method. Computer Science PSU HBG.

Design Patterns Revisited

DESIGN PATTERNS FOR MERE MORTALS

Design Patterns! Acknowledgements!

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

CSE870: Advanced Software Engineering (Cheng) 1

Design Pattern and Software Architecture: IV. Design Pattern

3 Product Management Anti-Patterns by Thomas Schranz

OODP Session 4. Web Page: Visiting Hours: Tuesday 17:00 to 19:00

Design Patterns. GoF design patterns catalog

Applying the Factory Method Design Pattern

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

What is a Pattern? Lecture 40: Design Patterns. Elements of Design Patterns. What are design patterns?

design patterns FOR B.tech (jntu - hyderabad & kakinada) (IV/I - CSE AND IV/II - IT) CONTENTS 1.1 INTRODUCTION TO DESIGN PATTERNS TTERNS... TTERN?...

Design for change. You should avoid

Think of drawing/diagramming editors. ECE450 Software Engineering II. The problem. The Composite pattern

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

CSCI 253. Overview. The Elements of a Design Pattern. George Blankenship 1. Object Oriented Design: Template Method Pattern. George Blankenship

Creational Design Patterns

Pro Objective-C Design Patterns for ios

UP Requirements. Software Design - Dr Eitan Hadar (c) Activities of greater emphasis in this book. UP Workflows. Business Modeling.

Design Patterns. Comp2110 Software Design. Department of Computer Science Australian National University. Second Semester

CS 2720 Practical Software Development University of Lethbridge. Design Patterns

SOLID DESIGN PATTERNS FOR MERE MORTALS

Transcription:

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 Patterns Abstract Factory Builder Factory Method Prototype Singleton Structural Patterns Adapter Bridge Composite Decorator Façade Flyweight Proxy Behavioral Patterns Chain of Responsibility Command Interpreter Iterator Mediator Memento Observer Strategy Template Method Visitor

Abstract Factory 3 Provides an interface for creating families of related or dependent objects without specifying their concrete classes A level of indirection that provides creation services Supports a family of products Supports many creation strategies: choice of derived class, reusing cached objects, distributed creation, choice of platform or address space The new statement considered harmful

Builder 4 Separate the construction of a complex object from its representation so that the same construction process can create different representations One common input, many possible outputs Wrapper/delegate structure Wrapper directs the algorithm of creation/composition Each delegate encapsulates a target output

Factory Method 5 Defines an interface for creating an object, but let subclasses decide which class to instantiate Lets a class defer instantiation to subclasses Indirect creation is carried out through inheritance Virtual constructor The new statement considered harmful

Prototype 6 Specifies the kinds of objects to create using a cloneable instance and creates new objects by copying this instance Indirect creation through delegation clone The new statement considered harmful

Singleton 7 Ensures a class has only one instance, and provides a global point of access to it Enforces a fixed number of instances of a class Lazy initialization Global access

Adapter 8 Converts the interface of a class into another interface clients expect Lets classes work together that otherwise couldn t because of incompatible interfaces Wraps an existing class with a new interface Impedance matches an old component with a new system Wrapper/delegate structure

Bridge 9 Decouples an abstraction from its implementation so that the two can vary independently Allows the implementation to change while the interface remains stable Wrapper/delegate structure Wrapper is a hierarchy that publishes the interface Delegate is a hierarchy that hides implementation baggage Insulation: envelope/letter structure or handle/body structure

Composite 10 Arranges objects into tree structures to represent part-whole hierarchies Lets clients treat individual objects and collections of objects uniformly Recursive composition 1-to-many has a up the is a hierarchy Examples: File system hierarchy GUI (menus, layout managers)

Decorator 11 Attaches additional responsibilities to an object dynamically Provides a flexible alternative to subclassing for extending functionality Recursive composition 1-to-1 has a up the is a hierarchy A single core object wrapped by possibly many optional objects User configuration of optional features to an existing class

Façade 12 Provides a unified interface to a set of interfaces in a subsystem Defines a higher-level interface that makes the subsystem easier to use Wraps an existing system with a new interface A simple entry point to a large sub-system A layer of indirection that hides legacy complexity

Flyweight 13 Uses sharing to support large numbers of fine-grained objects efficiently Highlight How to design dozens of small objects that incur minimal overhead Instance-independent state stays in the class Instance-dependent state is supplied by the customer A factory facilitates object reuse

Proxy 14 Provides a surrogate or placeholder for another object to control access to it An extra level of indirection that provides additional functionality: Distributed communication Auditing, logging Smart pointer Wrapper/delegate structure

Chain of Responsibility 15 Avoids coupling the sender of a request to its receiver by giving more than one object a chance to handle the request Links the receiving objects and passes the request along the list until an object handles it Recursive composition 1-to-1 has a at the top of the is a hierarchy Object-oriented linked list

Command 16 Encapsulates a request as an object, thereby letting you parameterize clients with different requests, queue or log requests, and support undoable operations Object-oriented callback A magic cookie that encapsulates a method invocation Execute

Interpreter 17 Given a language, defines a representation for its grammar along with a processor that uses the representation to parse sentences in the language Recursive composition 1-to-many has a up the is a hierarchy Processes a grammar

Iterator 18 Provides a way to access the elements of an aggregate object sequentially without exposing its underlying representation Polymorphic traversal Promotes the traversal of a collection to full object status

Mediator 19 Defines an object that encapsulates how a set of objects interact Promotes loose coupling by keeping objects from referring to each other explicitly, and lets you vary their interaction independently An extra level of indirection that encapsulates the many-to-many relationships between other components Wrapper/delegate structure Wrapper is a mapping object Delegates are a network of collaborating objects A politically-correct manager (or God) object

Memento 20 Without violating encapsulation, captures and externalizes an object's internal state so that the object can be restored to this state later Undo, rollback A magic cookie that encapsulates a check point capability

Observer 21 Defines a 1-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically Wrapper/delegate structure Wrapper encapsulates the core business logic Each delegate provides userconfigurable, optional functionality Example: A data presentation application with graph, bar chart, pie chart, and table views

State 22 Allows an object to alter its behavior when its internal state changes The object will appear to change its class Wrapper/delegate structure Wrapper passes its this pointer Delegate collaborates with wrapper

Strategy 23 Defines a family of algorithms, encapsulates each one, and makes them interchangeable Lets the algorithm vary independently from clients that use it Configures choice of algorithm Wrapper/delegate structure The client is the wrapper The algorithm object is the delegate

Template Method 24 Defines the skeleton of an algorithm in an operation, deferring some steps to subclasses Lets subclasses redefine certain steps of an algorithm without changing the algorithm s structure Configures steps of an algorithm Placeholders are specified in base class, and implemented in derived classes

Visitor 25 Represents an operation to be performed on the elements of an object structure Lets you define a new operation without changing the classes of the elements on which it operates Double dispatch Do the right thing based on the type of two objects Add operations to an existing hierarchy