GoF-Mediator Pattern
Details
- Full Name
-
GoF Mediator Pattern (Behavioral)
Intent:
Define an object that encapsulates how a set of objects interact. Mediator promotes loose coupling by keeping objects from referring to each other explicitly.
When to Use:
-
When a set of objects communicate in well-defined but complex ways
-
When reusing an object is difficult because it refers to and communicates with many other objects
-
When behavior distributed between several classes should be customizable without excessive subclassing
Prompt Example:
"Führe einen Mediator nach GoF ein, der die Kommunikation zwischen den UI-Komponenten (Formular, Liste, Filter) zentral koordiniert und die direkte Kopplung beseitigt."
Related Anchors:
-
GoF Design Patterns (Umbrella)