Facade Design Pattern


GoF Statement: Provides a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the subsystem easier to use.
Category: Structural
UML Diagram:  

Description of the Demonstration:

Everyone is familiar with the basket of remote controls for all the different pieces of electronic equipment in their entertainment system. Getting everything set up to watch a movie can seem to require a degree in electrical engineering. In this demonstration the Facade class provides a simplified interface to all of the "device" classes. A simple command call to Facade::playMovie will handle the setup and activation of all required parts of the system thus hiding the complexity of the system from the user.


Code:

Click here to download a zip file containing all the source files and an executable of the Demonstration. See the _ReadMe.txt file in the zip.