Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Facade pattern
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
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.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Facade pattern
(section)
Add topic