Facade Pattern
The Facade pattern provides a simplified interface to a complex subsystem. It reduces the complexity of the system by hiding the underlying implementation details.
When to Use:
Use the Facade pattern when you want to simplify the interface to a complex system.
Example
Pros:
- Simplifies the interface to complex subsystems.
- Promotes loose coupling between clients and subsystems.
Cons:
- Can lead to the creation of overly simple interfaces that don’t offer enough flexibility.
- May increase the complexity of the system if not used judiciously.