facade | has definition A pattern in which you create a class that provides a simplified interface to a package | ![2001-08-30 14:55:34.0](facet.gif) |
has context html>- Often, an application contains several complex packages.
- A programmer working with such packages has to manipulate many different classes
| ![2001-08-30 14:55:34.0](facet.gif) |
has forces html>- It is hard for a programmer to understand and use an entire subsystem - in particular, to determine which methods are public.
- If several different application classes call methods of the complex package, then any modifications made to the package will necessitate a complete review of all these classes.
| ![2001-08-30 14:55:34.0](facet.gif) |
has problem How do you simplify the view that programmers have of a complex package? | ![2001-08-30 14:55:34.0](facet.gif) |
has references one of the Gang of Four patterns. | ![2001-08-30 14:55:34.0](facet.gif) |
has solution - Create a special class, called a «Facade», which will simplify the use of the package.
- The «Facade» will contain a simplified set of public methods such that most other subsystems do not need to access the other classes in the package.
- The net result is that the package as a whole is easier to use and has a reduced number of dependencies with other packages.
- Any change made to the package should only necessitate a redesign of the «Facade»class.
| ![2001-08-30 14:55:34.0](facet.gif) |
is a subtopic of 6.9 - The Facade Pattern | ![2001-08-30 14:55:35.0](facet.gif) |
is an instance of design pattern | ![2001-08-30 14:55:35.0](facet.gif) |
design pattern | has antipatterns zero or more antipatterns - solutions that are inferior or do not work in this context with the reason for their rejection | ![2001-08-30 14:55:16.0](facet.gif) |
has name | ![2001-08-30 14:55:16.0](facet.gif) |
has related patterns zero or more related design patterns | ![2001-08-30 14:55:16.0](facet.gif) |
should be illustrated using a simple diagram | ![2001-08-30 14:55:16.0](facet.gif) |
should be written using a narrative writing style | ![2001-08-30 14:55:16.0](facet.gif) |
pattern | should be as general as possible | ![2001-08-30 14:56:56.0](facet.gif) |
should be described in an easy-to-understand form so that people can determine when and how to use it | ![2001-08-30 14:56:56.0](facet.gif) |
should contain a solution that has been proven to effectively solve the problem in the indicated context | ![2001-08-30 14:56:56.0](facet.gif) |