Design Patterns By Mareck Kortylevitch and Piotreck Ratchinsky.

Slides:



Advertisements
Similar presentations
GRASP: Designing Objects with Responsibilities
Advertisements

Lecture 9 Design Patterns CSCI – 3350 Software Engineering II Fall 2014 Bill Pine.
Design Patterns Section 7.1 (JIA’s) Section (till page 259) (JIA’s) Section 7.2.2(JIA’s) Section (JIA’s)
CS590L - Lecture 6 1 CS590L Distributed Component Architecture References: - E. Gamma, R. Helm, R. Johnson, J. Vlissides, Design Patterns: Elements of.
DESIGN PATTERNS OZGUR RAHMI DONMEZ.
Chapter 8, Object Design Introduction to Design Patterns
Façade Pattern Jeff Schott CS590L Spring What is a façade? 1) The principal face or front of a building 2) A false, superficial, or artificial appearance.
March 2007ACS Ron McFadyen1 Façade simplifies access to a related set of objects by providing one object that all objects outside the set use to.
Winter 2011ACS Ron McFadyen1 Façade A façade simplifies access to a related set of objects by providing one object that all objects outside the.
November Ron McFadyen1 Façade simplifies access to a related set of objects by providing one object that all objects outside the set use to.
Chapter 8 Object Design Reuse and Patterns. Finding Objects The hardest problems in object-oriented system development are: –Identifying objects –Decomposing.
ECE 355 Design Patterns Tutorial Part 2 (based on slides by Ali Razavi) Presented by Igor Ivković
Façade Design Pattern Source: Design Patterns – Elements of Reusable Object- Oriented Software; Gamma, et. al.
PRESENTED BY SANGEETA MEHTA EECS810 UNIVERSITY OF KANSAS OCTOBER 2008 Design Patterns.
Design Patterns Ric Holt & Sarah Nadi U Waterloo, March 2010.
Design Patterns.
Design Patterns. Now you are ready for Design Patterns Design patterns are recurring solutions to software design problems you find again and again in.
Design patterns. What is a design pattern? Christopher Alexander: «The pattern describes a problem which again and again occurs in the work, as well as.
SENG 422 Lab 2 Design Patterns Time: ELW B220 from (4:00 - 6:50) every Tuesday TA: Philip Baback Alipour Ph.D. Candidate in Electrical, Computer Engineering.
05 - Patterns Intro.CSC4071 Design Patterns Designing good and reusable OO software is hard. –Mix of specific + general –Impossible to get it right the.
Case Studies on Design Patterns Design Refinements Examples.
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
Architecture GRASP Realization of use cases in interaction diagrams Design class diagram Design ( how )
Abstract Factory Design Pattern making abstract things.
Design Pattern. The Observer Pattern The Observer Pattern defines a one-to-many dependency between objects so that when one object changes state, all.
Y2 eProjects Session 4 – Advanced Topics. Objectives  Dynamic Models  Design Patterns (Optional)  Software testing (for S4) ACCP i7.1\Sem3_4\eProject\T4.
Design Patterns CSCI 5801: Software Engineering. Design Patterns.
18 April 2005CSci 210 Spring Design Patterns 1 CSci 210.
Facade Introduction. Intent Provide a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the.
Software Design Patterns (1) Introduction. patterns do … & do not … Patterns do... provide common vocabulary provide “shorthand” for effectively communicating.
Design Patterns CS 124 Reference: Gamma et al (“Gang-of-4”), Design Patterns.
Structural Design Patterns
ECE450S – Software Engineering II
Design Patterns CSIS 3701: Advanced Object Oriented Programming.
Introduction to Design Patterns Part 1. © Lethbridge/Laganière 2001 Chapter 6: Using design patterns2 Patterns - Architectural Architectural Patterns:
Creational Patterns
08 - StructuralCSC4071 Structural Patterns concerned with how classes and objects are composed to form larger structures –Adapter interface converter Bridge.
Structural Patterns1 Nour El Kadri SEG 3202 Software Design and Architecture Notes based on U of T Design Patterns class.
FacadeDesign Pattern Provide a unified interface to a set of interfaces in a subsystem. Defines a high level interface that makes the subsystem easier.
DESIGN PATTERNS COMMONLY USED PATTERNS What is a design pattern ? Defining certain rules to tackle a particular kind of problem in software development.
1 OO Analysis & Design - Introduction to main ideas in OO Analysis & design - Practical experience in applying ideas.
Design Patterns Software Engineering CS 561. Last Time Introduced design patterns Abstraction-Occurrence General Hierarchy Player-Role.
Design Patterns Introduction
1 Chapter 5:Design Patterns. 2 What are design pattern?  Schematic description of design solution to recurring problems in software design and,  Reusable.
CSC 480 Software Engineering Design With Patterns.
The Facade Pattern (Structural) ©SoftMoore ConsultingSlide 1.
Watching the movie the hard way…. Page 256 – Head First Design Patterns.
1 Here are some quotations to get an overview of the kinds of issues of interest.
CLASSIFICATION OF DESIGN PATTERNS Hladchuk Maksym.
Presented by FACADE PATTERN
Design Patterns: MORE Examples
Design Patterns (Chapter 6 of Text Book – Study just 8)
Façade Pattern:.
Chapter 5:Design Patterns
Software Design Patterns
MPCS – Advanced java Programming
Introduction to Design Patterns
Design Patterns Lecture part 2.
Software Design & Documentation
Software Design and Architecture
Presented by Igor Ivković
PH page GoF Singleton p Emanuel Ekstrom.
Software Engineering Lecture 7 - Design Patterns
State Design Pattern 1.
Introduction to Design Patterns Part 1
CS 350 – Software Design Singleton – Chapter 21
Chapter 8, Design Patterns Introduction
Presented by Igor Ivković
Chapter 8, DesignPatterns Facade
defines a higher-level interface that makes a subsystem easier to use
Presentation transcript:

Design Patterns By Mareck Kortylevitch and Piotreck Ratchinsky

What is Design Pattern? Recurring solution to known problems Recurring solution to known problems Workaround to problems that arise when developing software within a particular context Workaround to problems that arise when developing software within a particular context

History Precursor of design pattern was Christopher Alexander Precursor of design pattern was Christopher Alexander First Design Patterns used in architecture First Design Patterns used in architecture

Why to use DP? Help you learn from others' successes instead of your own failures Help you learn from others' successes instead of your own failures Provide a communication platform concerning elegant, reusable solutions to commonly encountered programming challenges Provide a communication platform concerning elegant, reusable solutions to commonly encountered programming challenges

Why to use...continuation Enforce using techspeak Enforce using techspeak Isolate changes in the code Isolate changes in the code Design and interaction of objects Design and interaction of objects

Design Patterns Examples Facade Facade Adapter Adapter Singleton Singleton Abstract Factory Abstract Factory Bridge Bridge

Facade - definition Provide a unified interface to a set of interfaces in a subsystem. Façade defines a higher-level interface that makes the subsystem easier to use. Provide a unified interface to a set of interfaces in a subsystem. Façade defines a higher-level interface that makes the subsystem easier to use.

Facade - UML class diagram

Facade - example Facade (MortgageApplication) Facade (MortgageApplication) knows which subsystem classes are responsible for a request. knows which subsystem classes are responsible for a request. delegates client requests to appropriate subsystem objects. delegates client requests to appropriate subsystem objects. Subsystem classes (Bank, Credit, Loan) Subsystem classes (Bank, Credit, Loan) implement subsystem functionality. implement subsystem functionality. handle work assigned by the Facade object. handle work assigned by the Facade object. have no knowledge of the facade and keep no reference to it. have no knowledge of the facade and keep no reference to it.

Facade – example diagram Facade Subsystems LoanCreditBank

Singleton - definition ensure a class has only one instance and provide a global point of access to it. ensure a class has only one instance and provide a global point of access to it. defines an Instance operation that lets clients access its unique instance. Instance() is a class operation. defines an Instance operation that lets clients access its unique instance. Instance() is a class operation. responsible for creating and maintaining its own unique instance. responsible for creating and maintaining its own unique instance.

Singleton – UML Singleton -Singleton() +static getInstance():Singleton -static Singleton: instance