Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Facade pattern
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Structure== === UML class and sequence diagram === {{multiple image | direction=horizontal | footer=A sample UML class and sequence diagram for the facade design pattern | image1=Facade Design Pattern Class Diagram UML.svg | alt1=Facade Design Pattern Class Diagram | width1=300 | image2=Facade Design Pattern Sequence Diagram UML.svg | alt2=Facade Design Pattern Sequence Diagram | width2=350 }} In this [[Unified Modeling Language|UML]] [[class diagram]], the <code>Client</code> class doesn't access the subsystem classes directly. Instead, the <code>Client</code> works through a <code>Facade</code> class that implements a simple interface in terms of (by delegating to) the subsystem classes (<code>Class1</code>, <code>Class2</code>, and <code>Class3</code>). The <code>Client</code> depends only on the simple <code>Facade</code> interface and is independent of the complex subsystem.<ref>{{cite web|title=The Facade design pattern - Structure and Collaboration|url=http://w3sdesign.com/?gr=s05&ugr=struct|website=w3sDesign.com|access-date=2017-08-12}}</ref> The sequence diagram shows the run-time interactions: The <code>Client</code> object works through a <code>Facade</code> object that delegates the request to the <code>Class1</code>, <code>Class2</code>, and <code>Class3</code> instances that perform the request. === UML class diagram === [[File:Example of Facade design pattern in UML.png]] ; Facade : The facade class abstracts Packages 1, 2, and 3 from the rest of the application. ; Clients : The objects are using the facade pattern to access resources from the packages.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)