Facade Pattern Flashcards
(10 cards)
Facade
A single class that provides a simplified, high-level interface to a complex subsystem. It delegates client requests to the appropriate internal classes.
Client
The part of the system that interacts with the facade. It has no direct knowledge of the underlying subsystem classes.
Subsystem Classes
The internal components or classes of the large, complex system. These are hidden from the client and accessed only through the facade.
facadeFunction()
A method in the Facade class that coordinates calls to subsystem methods.
Low Coupling
Client remains independent of the internal workings of the subsystem. This allows changes within the system without affecting the client code.
Reusability
The ability to reuse the complex system in new applications or with new clients by simply creating new facade interfaces.
Maintainability
The ease of modifying the underlying system without disrupting the client. The facade acts as a buffer.
Structural Pattern
A type of design pattern concerned with how classes and objects are composed to form larger structures. Facade belongs to this category.
Facade Pattern
A structural design pattern that provides a simplified, high-level interface to a complex system of classes, functions, or subsystems.
3 Roles in the Facade Pattern
Client
Facade
Subsystem Classes