Facade is a structural design pattern that provides a simplified interface to a library, a framework, or any other complex set of classes.It helps encapsulate the complexity of multiple subsystems into a single unified interface.
In software terms, Facade pattern hides the complexities of the systems and provides a simple interface to the clients.
This pattern involves one wrapper class which contains a set of methods available for the client. This pattern is particularly used when a system is very complex or difficult to understand and when the system has multiple subsystems.
Component of Facade Design Pattern
- Complex System: A library of subsystems.
- Subsystems: These are classes within a complex system and offer detailed operations.
- Façade: This is a wrapper class which wrapper class which contains a set of members which are required by the client.
- Client: This is a class which calls the high-level operations in the Façade.