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!
== Usage == A Facade is used when an easier or simpler interface to an underlying object is desired.<ref>{{cite book | last1 = Freeman | first1 = Eric | last2 = Freeman | first2 = Elisabeth | last3 = Sierra | first3 = Kathy | last4 = Bates | first4 = Bert | editor1-last = Hendrickson | editor1-first = Mike | editor2-last = Loukides | editor2-first = Mike | year = 2004 | title = Head First Design Patterns | volume = 1 | pages = 243, 252, 258, 260 | publisher = O'Reilly | format = paperback | isbn = 978-0-596-00712-6 | access-date = 2012-07-02 | url = https://www.goodreads.com/book/show/58128.Head_First_Design_Patterns }}</ref> Alternatively, an [[Adapter pattern|adapter]] can be used when the wrapper must respect a particular interface and must support [[Polymorphism (computer science)|polymorphic]] behavior. A [[Decorator pattern|decorator]] makes it possible to add or alter behavior of an interface at run-time. {| class="wikitable" ! Pattern !! Intent |- | [[Adapter_pattern|Adapter]] || Converts one interface to another so that it matches what the client is expecting |- | [[Decorator_pattern|Decorator]] || Dynamically adds responsibility to the interface by wrapping the original code |- | Facade || Provides a simplified interface |} The facade pattern is typically used when * a simple interface is required to access a complex system, * a system is very complex or difficult to understand, * an entry point is needed to each level of layered software, or * the abstractions and implementations of a subsystem are tightly coupled.
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)