Structural Design Patterns

Facade

Intent: Provide a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the subsystem easier to use.

Use the Facade pattern to simplify the use of an existing subsystem when either only a part of the existing subsystem is needed, or when the exsisting subsystem needs to be used in a particular way.


The Facade pattern presents the clients a new, a unified interface to a subsystem. Only the implementor or the Facade class has to know the details of the subsystem.



Implementation:

Create a collection of easier-to-understand and more directly useable methods that invoke some harder-to-understand and not directly usable methods of the underlying subsystem. Omit methods from the underlying subsystem that are not needed for the current application.