SOFTWARE DESIGN AND ARCHITECTURE

Slides:



Advertisements
Similar presentations
In the name of God Fa ç ade Design Pattern Amin Mozhgani Software engineering(II)
Advertisements

Façade Pattern Your Home theatre. Task list In terms of classes.
JDBC Session 4 Tonight: Design Patterns 1.Introduction To Design Patterns 2.The Factory Pattern 3.The Facade Pattern Thursday & Next Tuesday: Data Access.
Dept. of Computer Engineering, Amirkabir University of Tech. 1 Design Patterns Dr. Noorhosseini Introduction.
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.
Chapter 8 Object Design Reuse and Patterns. Finding Objects The hardest problems in object-oriented system development are: –Identifying objects –Decomposing.
Façade Design Pattern Source: Design Patterns – Elements of Reusable Object- Oriented Software; Gamma, et. al.
Chapter 22 Object-Oriented Design
PRESENTED BY SANGEETA MEHTA EECS810 UNIVERSITY OF KANSAS OCTOBER 2008 Design Patterns.
Design Patterns academy.zariba.com 1. Lecture Content 1.What are Design Patterns? 2.Creational 3.Structural 4.Behavioral 5.Architectural 6.Design Patterns.
Chapter 26 Applying Gang of Four Design Patterns 1CS6359 Fall 2012 John Cole.
Design Patterns Ric Holt & Sarah Nadi U Waterloo, March 2010.
Informatics 122 Software Design II Lecture 6 Emily Navarro Duplication of course material for any commercial purpose without the explicit written permission.
CS 4240: Introduction to Design Patterns Readings: Chap. 5 of Design Patterns Explained Also, Chap. 6 and 7 Also, on-line info on Composite pattern (and.
Seven Habits of Effective Pattern Writers Facade Pattern PH pp GoF pp John Klacsmann.
Client/Server Software Architectures Yonglei Tao.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. The Façade Design Pattern (1) –A structural design pattern.
Design Patterns.
1 Dept. of Computer Science & Engineering, York University, Toronto CSE3311 Software Design Adapter Pattern Façade pattern.
Software Engineering 1 Object-oriented Analysis and Design Applying UML and Patterns An Introduction to Object-oriented Analysis and Design and Iterative.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 27. Review UML dynamic view – State Diagrams.
The Adapter Pattern SE-2811 Dr. Mark L. Hornick 1.
Design Patterns CSCI 5801: Software Engineering. Design Patterns.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 05. Review Software design methods Design Paradigms Typical Design Trade-offs.
Facade Introduction. Intent Provide a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the.
CS 210 Adapter Pattern October 19 th, Adapters in real life Page 236 – Head First Design Patterns.
The Façade Pattern SE-2811 Dr. Mark L. Hornick 1.
Structural Design Patterns
Design Patterns CSIS 3701: Advanced Object Oriented Programming.
ECE450 - Software Engineering II1 ECE450 – Software Engineering II Today: Design Patterns IV Structural Patterns.
Week 9, Class 3: Model-View-Controller Today Happens-Before Adapter and Façade Pattern (high-level) Tuesday: Project code due, 11pm Wednesday: Quiz Choose.
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.
OO Methodology Elaboration Iteration 2 - Design Patterns -
FacadeDesign Pattern Provide a unified interface to a set of interfaces in a subsystem. Defines a high level interface that makes the subsystem easier.
Patterns Roberto Damiani Mendes. Roteiro Definition; Definition; Architecture Patterns; Architecture Patterns; Design Patterns; Design Patterns; GRASP.
CS 210 Final Review November 28, CS 210 Adapter Pattern.
More Design Patterns From: Shalloway & Trott, Design Patterns Explained, 2 nd ed.
JAVA DESIGN PATTERN Structural Patterns - Facade Pattern Presented by: Amit kumar narela Ise Ise
1 Advanced Object-oriented Design – Principles and Patterns Structural Design Patterns.
Adapter and Façade Patterns By Wode Ni and Leonard Bacon-Shone.
The Facade Pattern (Structural) ©SoftMoore ConsultingSlide 1.
Example to motivate discussion We have two lists (of menu items) one implemented using ArrayList and another using Arrays. How does one work with these.
Watching the movie the hard way…. Page 256 – Head First Design Patterns.
CS 210 Proxy Pattern Nov 16 th, RMI – A quick review A simple, easy to understand tutorial is located here:
Design Patterns: Structural Design Patterns General and reusable solutions to common problems in software design Software University
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Broker Design Patterns: Façade and Mediator.
An object's behavior depends on its current state. Operations have large, multipart conditional statements that depend on the object's state.
CS 350 – Software Design The Facade Pattern – Chapter 6 Many design patterns are catalogued in the “Gang of Four” text. I find their definitions not to.
COMPOSITE PATTERN NOTES. The Composite pattern l Intent Compose objects into tree structures to represent whole-part hierarchies. Composite lets clients.
CLASSIFICATION OF DESIGN PATTERNS Hladchuk Maksym.
Facade Pattern Jim Fawcett CSE776 – Design Patterns Summer 2010
Presented by FACADE PATTERN
BTS530: Major Project Planning and Design
Façade Pattern:.
GoF Patterns (GoF) popo.
Design Patterns Lecture part 2.
Software Design & Documentation
Chapter Six The Facade Pattern
By SmartBoard team Adapter pattern.
Design Pattern: Facade
Facade Pattern Jim Fawcett CSE776 – Design Patterns Summer 2010
Decorator Design Pattern
CS 350 – Software Design The Facade Pattern – Chapter 6
Component Based Software Engineering
Object Oriented Design Patterns - Structural Patterns
10. Façade Pattern SE2811 Software Component Design
Software Design Lecture : 35.
defines a higher-level interface that makes a subsystem easier to use
GoF Patterns Ch. 26.
Presentation transcript:

SOFTWARE DESIGN AND ARCHITECTURE LECTURE 29

Review Design pattern classifications Structural Design Pattern Adapter Pattern

Outline Structural Design Patterns Façade Pattern

Structural Patterns Structural class patterns: deal with the composition of classes or objects. Structural class patterns: use inheritance to compose classes Structural object patterns: describe ways to assemble objects.

Façade Pattern

Façade Pattern Problem There may be undesirable coupling to many things in the subsystem, or the implementation of the subsystem may change. What to do?

Façade – Example (Home Theater)

Façade - Example Starting the HomeTheater Put the screen down Turn on the projector Dim the lights Set the projector input to DVD Turn the amplifier on Set the amplifier to DVD input Turn the DVD player on Start the DVD Player playing

Turning everything off at the end Complex task to listen music When upgraded or new things added, you would have to learn new steps

Lights, Camera, Façade! A Façade is what you need. With the façade pattern, you can take a complex subsystem and make it easier to use by implementing a façade class that provides a reasonable set of interfaces.

Watch a movie with ease

Façade - Definition Provides a unified interface to a set of interfaces in a sub-system. Defines a higher level interface that makes the subsystem easier to use.

Facade Problem Solution There may be undesirable coupling to many things in the subsystem, or the implementation of the subsystem may change. What to do? Solution Define a single point of contact to the subsystem facade object that wraps the subsystem. This facade object presents a single unified interface and is responsible for collaborating with the subsystem components

Facade

Facade

Façade - Consequences It shields clients from subsystem components, thereby reducing the number of objects that clients deal with and making the subsystem easier to use It promotes weak coupling between the subsystem and its clients. Weak coupling lets you vary the components of the subsystem without affecting its clients It doesn't prevent applications from using subsystem classes if they need to.

Façade vs. Adapter With both the Facade and Adapter pattern, we have preexisting classes. With the Facade, however, we do not have an interface we must design to, as we do in the Adapter pattern. We are not interested in polymorphic behavior with the Facade; whereas with the Adapter, we probably are. In the case of the Facade pattern, the motivation is to simplify the interface. With the Adapter, although simpler is better, we try to design to an existing interface and cannot simplify things even if a simpler interface were otherwise possible.

Façade Pattern - Example

Individual Classes

Façade Class

*

Summary Structural Design Patterns Façade Pattern