The Façade Pattern SE-2811 Dr. Mark L. Hornick 1.

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.
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.
Software Engineering I Object-Oriented Design Software Design Refinement Using Design Patterns Instructor: Dr. Hany H. Ammar Dept. of Computer Science.
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 academy.zariba.com 1. Lecture Content 1.What are Design Patterns? 2.Creational 3.Structural 4.Behavioral 5.Architectural 6.Design Patterns.
Design Patterns Ric Holt & Sarah Nadi U Waterloo, March 2010.
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.
A Behavior Object Pattern
1 Dept. of Computer Science & Engineering, York University, Toronto CSE3311 Software Design Adapter Pattern Façade pattern.
Software Design Refinement Using Design Patterns Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
SOFTWARE DESIGN AND ARCHITECTURE
SE2811 Week 7, Class 1 Composite Pattern Applications Conceptual form Class structure Coding Example Lab Thursday: Quiz SE-2811 Slide design: Dr. Mark.
Design Patterns Part two. Structural Patterns Concerned with how classes and objects are composed to form larger structures Concerned with how classes.
The Adapter Pattern SE-2811 Dr. Mark L. Hornick 1.
The Factory Patterns SE-2811 Dr. Mark L. Hornick 1.
L11-12: Design Patterns Definition Iterator (L4: Inheritance)‏ Factory (L4: Inheritance)‏ Strategy (L5: Multiple Inheritance)‏ Composite (L6: Implementation.
Facade Introduction. Intent Provide a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the.
Unit 4 Object-Oriented Design Patterns NameStudent Number CAI XIANGHT082182A KYAW THU LINHT082238Y LI PENGFEIHT082220L NAUNG NAUNG LATTHT082195L PLATHOTTAM.
Week 2, Day 2: The Factory Method Pattern Other good design principles Cohesion vs. Coupling Implementing the Strategy Pattern Changing strategies (behaviors)
Structural Design Patterns
Week 6, Class 1 & 2: Decorators Return Exam Questions about lab due tomorrow in class? Threads Locking on null object invokeLater & the squares example.
Design Patterns CSIS 3701: Advanced Object Oriented Programming.
The Proxy Pattern SE-2811 Dr. Mark L. Hornick 1. The Proxy Pattern has many variations, but in general: The Proxy Pattern uses an proxy object as a surrogate.
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.
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.
Inheritance Revisited Other Issues. Multiple Inheritance Also called combination--not permitted in Java, but is used in C++ Also called combination--not.
Java EE Patterns Dan Bugariu.  What is Java EE ?  What is a Pattern ?
JAVA DESIGN PATTERN Structural Patterns - Facade Pattern Presented by: Amit kumar narela Ise Ise
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:
CS 5150 Software Engineering Lecture 16 Program Design 3.
Seung Ha.  Façade is generally one side of the exterior of a building, especially the front.  Meaning “frontage” or “face”  In software architecture,
The Command Pattern SE-2811 Dr. Mark L. Hornick 1.
Design Patterns Creational Patterns. Abstract the instantiation process Help make the system independent of how its objects are created, composed and.
Week 9, Day 1 Proxy SE-2811 Slide design: Dr. Mark L. Hornick Content: Dr. Hornick Errors: Dr. Yoder 1.
Week 5, Class 3: Decorators Lab questions? Example: Starbuzz coffee Basic Pattern More examples Design Principles Compare with alternatives SE-2811 Slide.
CPSC 875 John D. McGregor C8 - Tactics. Everything is a plugin.
WHAT IS COMPUTER ? . A computer is a complex system consisting of both hardware and software components.
Facade Pattern Jim Fawcett CSE776 – Design Patterns Summer 2010
Presented by FACADE PATTERN
BTS530: Major Project Planning and Design
Façade Pattern:.
Software Design & Documentation
Week 2, Day 1: The Factory Method Pattern
Chapter Six The Facade Pattern
Design Pattern: Facade
Composite Pattern SE2811 Software Component Design
Facade Pattern Jim Fawcett CSE776 – Design Patterns Summer 2010
Decorator Design Pattern
CS 350 – Software Design The Facade Pattern – Chapter 6
Presented by Igor Ivković
Model-View-Controller
7. Decorator, Façade Patterns
Object Oriented Design Patterns - Structural Patterns
7. Decorator, Façade Patterns
13. Composite Pattern SE2811 Software Component Design
10. Façade Pattern SE2811 Software Component Design
Software Design Lecture : 35.
13. Composite Pattern SE2811 Software Component Design
Presented by Igor Ivković
Presentation transcript:

The Façade Pattern SE-2811 Dr. Mark L. Hornick 1

Watching a Movie... Use multiple interfaces (remotes) to Turn on Receiver/amplifier Turn on TV/Monitor Turnn on DVD player Set the Receiver input to DVD Put the Monitor in HDMI input mode Set the Receiver volume to medium Set Receiver to DTS Surround Start the DVD player. Interacting with the following classes: Receiver/Amplifier TV/Monitor DVD

To decrease the complexity.. We can create a new class TheaterFacade (e.g. a universal remote) which exposes a few methods such as watchMovie(). The façade treats the various components as a sub system and calls on them to implement the watchMovie method. So to watch a movie, we just call one method, watchMovie and it communicates with the Monitor, DVD, and Receiver for us. The façade still leaves the subsystem accessible to be used directly. If you need the advanced functionality of the subsystem classes, they are available for use.

The Problem Complex system Consisting of multiple subsystems Each with its own interface, each with many methods Difficult for clients (blue) to deal with

Facade Solution Solution Centralize subsystem interface Simplify/reduce number of centralized methods Façade presents new unified “face” to clients Facade

Removing the burden from beginning Java developers with a Façade (WinPlotter) SE-2811 Dr. Mark L. Hornick 6

Generic Pattern SE-2811 Dr. Mark L. Hornick 7

Facade Consequences Shields clients from subsystem components Make subsystem easier to use Reduces coupling from client to subsystem classes Allow internal classes to change freely Permit “layering” of system function Level of client-subsystem coupling Make Facade an abstract class  Different concrete subclasses for different implementations of the subsystem. Configure the façade object with different subsystem objects.

Facade Applications Interface to existing library Unify or “clean up” complex interface Design layered system Various service levels Façade abstracts interface of each level Provide abstract interfaces To alternative implementations