Object Oriented Software Engineering   View all facts   Glossary   Help
subject > pattern > design pattern > facade
Next design patterngeneral hierarchy    Updesign pattern    Previous design patterndelegation   

facade
subjectfact 
facadehas definition A pattern in which you create a class that provides a simplified interface to a package2001-08-30 14:55:34.0
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
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
has problem How do you simplify the view that programmers have of a complex package?2001-08-30 14:55:34.0
has references one of the Gang of Four patterns.2001-08-30 14:55:34.0
has solution
  1. Create a special class, called a «Facade», which will simplify the use of the package.
  2. 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.
  3. The net result is that the package as a whole is easier to use and has a reduced number of dependencies with other packages.
  4. Any change made to the package should only necessitate a redesign of the «Facade»class.
2001-08-30 14:55:34.0
is a subtopic of 6.9 - The Facade Pattern2001-08-30 14:55:35.0
is an instance of design pattern2001-08-30 14:55:35.0
design patternhas antipatterns zero or more antipatterns - solutions that are inferior or do not work in this context with the reason for their rejection2001-08-30 14:55:16.0
has name2001-08-30 14:55:16.0
has related patterns zero or more related design patterns2001-08-30 14:55:16.0
should be illustrated using a simple diagram2001-08-30 14:55:16.0
should be written using a narrative writing style2001-08-30 14:55:16.0
patternshould be as general as possible2001-08-30 14:56:56.0
should be described in an easy-to-understand form so that people can determine when and how to use it2001-08-30 14:56:56.0
should contain a solution that has been proven to effectively solve the problem in the indicated context2001-08-30 14:56:56.0

Next design patterngeneral hierarchy    Updesign pattern    Previous design patterndelegation