The Facade pattern is a structural GoF design pattern by Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides that provides a unified interface to a set of interfaces in a subsystem. The facade defines a higher-level interface that makes the subsystem easier to use and reduces the many dependencies between clients and implementation classes, for example by hiding validation, authorization and billing behind one simple payment interface.
GoF-Facade Pattern
Details
- Full Name
-
GoF Facade Pattern (Structural)
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.
When to Use:
-
When you want to provide a simple interface to a complex subsystem
-
When there are many dependencies between clients and implementation classes
Prompt Example:
"Erstelle eine Facade nach GoF für das Payment-Subsystem, die Validierung, Autorisierung und Abrechnung hinter einem einfachen Interface kapselt."
Related Anchors:
-
GoF Design Patterns (Umbrella)