Seung Ha.  Façade is generally one side of the exterior of a building, especially the front.  Meaning “frontage” or “face”  In software architecture,

Slides:



Advertisements
Similar presentations
JDBC Session 4 Tonight: Design Patterns 1.Introduction To Design Patterns 2.The Factory Pattern 3.The Facade Pattern Thursday & Next Tuesday: Data Access.
Advertisements

James Tam Introduction To Design Patterns You will learn about design techniques that have been successfully applied to different scenarios.
Design Patterns CS is not simply about programming
© 2006 Pearson Addison-Wesley. All rights reserved4-1 Chapter 4 Data Abstraction: The Walls.
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.
James Tam Introduction To Design Patterns You will learn about design techniques that have been successfully applied to different scenarios.
Spring 2010CS 2251 Design Patterns. Spring 2010CS 2252 What is a Design Pattern? "a general reusable solution to a commonly occurring problem in software.
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.
Chapter 25 More Design Patterns.
Seven Habits of Effective Pattern Writers Facade Pattern PH pp GoF pp John Klacsmann.
Client/Server Software Architectures Yonglei Tao.
Builder A Creational Design Pattern A Presentation by Alex Bluhm And.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. The Façade Design Pattern (1) –A structural design pattern.
Principles of Computer Programming (using Java) Review Haidong Xue Summer 2011, at GSU.
Case Studies on Design Patterns Design Refinements Examples.
SOFTWARE DESIGN AND ARCHITECTURE
Design Patterns Part two. Structural Patterns Concerned with how classes and objects are composed to form larger structures Concerned with how classes.
Design Patterns: Structural Design Patterns
DaveAndAl.net Do Application Design Patterns Make Sense in ASP.NET? Alex Homer You may like to write these down now...
Copyright © 2002, Systems and Computer Engineering, Carleton University Patterns.ppt * Object-Oriented Software Development Part 11.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 27. Review UML dynamic view – State Diagrams.
James Tam Introduction To Design Patterns You will learn about design techniques that have been successfully applied to different scenarios.
The Adapter Pattern SE-2811 Dr. Mark L. Hornick 1.
Design Patterns Introduction to Design Patterns Eriq Muhammad Adams J. Mail : | Blog :
Swing MVC Application Layering A Layer is a collection of components that Perform similar tasks. Perform similar tasks. Isolate implementation details.
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.
Software Design Patterns (1) Introduction. patterns do … & do not … Patterns do... provide common vocabulary provide “shorthand” for effectively communicating.
The Façade Pattern SE-2811 Dr. Mark L. Hornick 1.
Mohammed Al-Dhelaan CSci 253 Object Oriented Design Instructor: Brad Taylor 06/02/2009 Factory Method Pattern.
Design Patterns CSIS 3701: Advanced Object Oriented Programming.
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.
An Introduction To Design Patterns Jean-Paul S. Boodhoo Independent Consultant
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.
Modern Programming Language. Web Container & Web Applications Web applications are server side applications The most essential requirement.
Proxy Pattern defined The Proxy Pattern provides a surrogate or placeholder for another object to control access to it by creating a representative object.
Watching the movie the hard way…. Page 256 – Head First Design Patterns.
Architecture, Design Patterns and Faithful Implementation David Woollard University of Southern California Software Architecture Group NASA Jet Propulsion.
ASP.NET MVC An Introduction. What is MVC The Model-View-Controller (MVC) is an architectural pattern separates an application into three main components:
THE PHOENIX ARCHITECTURE A New Approach to Student Satellite Software Riley Pack University of Colorado at Boulder.
Facade Pattern Jim Fawcett CSE776 – Design Patterns Summer 2010
Presented by FACADE PATTERN
Introduction To Design Patterns
Design Patterns Source: “Design Patterns”, Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides And Created.
Façade Pattern:.
GoF Patterns (GoF) popo.
MPCS – Advanced java Programming
Software Design & Documentation
Factory pattern Unit of Work
Facade Pattern Jim Fawcett CSE776 – Design Patterns Summer 2010
Decorator Design Pattern
Presented by Igor Ivković
null, true, and false are also reserved.
Object Oriented Design Patterns - Structural Patterns
Introduction to Databases Transparencies
Serpil TOK, Zeki BAYRAM. Eastern MediterraneanUniversity Famagusta
School of Computer Science
10. Façade Pattern SE2811 Software Component Design
Composite Design Pattern By Aravind Reddy Patlola.
Presented by Igor Ivković
SOEN 343 Software Design Computer Science and Software Engineering Department Concordia University Fall 2004 Instructor: Patrice Chalin.
Presentation transcript:

Seung Ha

 Façade is generally one side of the exterior of a building, especially the front.  Meaning “frontage” or “face”  In software architecture, façade defines high level interface to use subsystems.

facade client classes subsystem classes 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.

 To provide simple interface to a complex subsystems.  To decouple the subsystem from clients and other systems.  To layer subsystems.

 Façade o The façade class interacts subsystem classes with the rest of the application.  Subsystem classes o Software library / API collection accessed through the façade class  Clients o The objects using the façade pattern to access resources from the subclasses Client1 Class1 Class2 Class3 Client2 facade DoSomething() Public void DoSomething() { Class1 book = new Class1(); Class2 customer = new Class2(); Class3 billing = new Class3(); book.CheckStock(); customer.GetShippingInformation(); billing.Process(book, customer); }

 Shields clients from subsystem components.  Reducing the number of objects that clients deal with and making the subsystem easier to use.  Layer a system and the dependencies between objects.  Eliminate complex or circular dependencies. This can be an important consequence when the client and the subsystem are implemented independently.  Reducing compilation dependencies – vital in large software systems

 Reducing client-subsystem coupling : o The coupling between clients and the subsystem can be reduced even further by making Façade an abstract class with concrete subclasses for different implementation of a subsystem.  Public vs. private subsystem classes : o Public interface to a subsystem consists of classes that all clients can access (Façade class is part of the public interface.) o Private interface is just for subsystem extenders.

 Data Access Layer vs. Business Layer  Data access subclasses defines how to access databases and meta data.  Business logic classes knows how to use data.  Façade – Data object  Common authentication interface  XML standardized data structure  Simple interface to access data Database SQL Server Data Access Subclasses Facade Data Object Business Logic Database Access Client Web Page

... private void GetData(int productID) { VirtualObjectModel.Framework.Login login = new VirtualObjectModel.Framework.Login( System.Configuration.ConfigurationSettings.AppSettings["LoginID"], System.Configuration.ConfigurationSettings.AppSettings["Password"], System.Configuration.ConfigurationSettings.AppSettings["Database"], System.Configuration.ConfigurationSettings.AppSettings["DatabaseServer"]); VOM.ObjectModel.Northwind.Products obj = new VOM.ObjectModel.Northwind.Products(login.ConnectionString); obj.GetData(productID); SetData(obj); }... Client – ASP.NET page

[Serializable()] public class Products {... public virtual void GetData(int productID) { try { XLMLDataTable xdt = new XLMLDataTable(_connectionString); xdt.DataSourceType = XLMLType.DataSourceType.SQLServer; xdt.CommandText * FROM Northwind.dbo.[Products] WHERE ProductID VirtualObjectModel.Framework.XLMLType.DataType.INT).Value = productID; xdt.GetData(); foreach (XLMLDataRow xdr in xdt.XLMLDataRowList) { Products obj = this; xdr.SetAttribute(obj); }; } catch (System.Exception ex) { throw ex; }... } Business Object

public class XLMLDataTable:XLML {... public void GetData() { try { if (this.ConnectionString != string.Empty || this.CommandText != string.Empty) { XLMLDataTable xlmlDataTable = new XLMLDataTable(); switch (this.DataSourceType) { case XLMLType.DataSourceType.SQLServer: xlmlDataTable = GetXLMLDataTable(MSSQLServerDataService.ExecuteReader(this.ConnectionString, this.CommandType,... break; case XLMLType.DataSourceType.Access: xlmlDataTable = GetXLMLDataTable(GetDataTable(this.ConnectionString, this.CommandText)); break; default: break; } this.Description = xlmlDataTable.Description; this.ID = xlmlDataTable.ID; this.XLMLDataColumnList = xlmlDataTable.XLMLDataColumnList; this.XLMLDataRowList = xlmlDataTable.XLMLDataRowList; } catch (Exception ex) { this.Exception = ex; }... } Façade – Data Object

public class XLML {... protected XLMLDataTable GetXLMLDataTable(SqlDataReader sqlDataReader) { XLMLDataTable xlmlDataTable = new XLMLDataTable(); try { SetDataTableSchema(sqlDataReader, ref xlmlDataTable); SetDataRowList(sqlDataReader, ref xlmlDataTable); } catch (Exception ex) { throw ex; } finally { sqlDataReader.Close(); } return xlmlDataTable; }... } Data Access Subclass

 Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. Design Patterns. Addison-Wesley Professional Computing Series  Wikipedia – Façade & Façade pattern