Mediator pattern
E679872
The Mediator pattern is a behavioral design pattern that centralizes complex communication and control logic between multiple objects, promoting loose coupling by having them interact through a mediator instead of directly with each other.
Statements (47)
| Predicate | Object |
|---|---|
| instanceOf |
behavioral design pattern
ⓘ
software design pattern ⓘ |
| alias | Object Mediator NERFINISHED ⓘ |
| appliedIn |
GUI widget interaction management
ⓘ
chat room or messaging systems ⓘ user interface dialog coordination ⓘ workflow and business process coordination ⓘ |
| belongsTo | Gang of Four design patterns NERFINISHED ⓘ |
| benefit |
localizes behavior that would otherwise be distributed among several objects
ⓘ
simplifies object protocols ⓘ |
| category | behavioral pattern ⓘ |
| communicationStyle |
colleagues do not reference each other directly
ⓘ
indirect communication via mediator ⓘ |
| consequence |
centralizes control logic in mediator
ⓘ
mediator can become complex and monolithic ⓘ reduces number of inter-object dependencies ⓘ |
| defines |
colleague objects that communicate via mediator
ⓘ
mediator object that encapsulates communication logic ⓘ |
| describedIn | Design Patterns: Elements of Reusable Object-Oriented Software NERFINISHED ⓘ |
| differsFrom | Observer pattern by centralizing rather than distributing control ⓘ |
| drawback | mediator can become a god object if overused ⓘ |
| firstPublishedYear | 1994 ⓘ |
| intent | define an object that encapsulates how a set of objects interact ⓘ |
| introducedBy |
Erich Gamma
NERFINISHED
ⓘ
John Vlissides NERFINISHED ⓘ Ralph Johnson NERFINISHED ⓘ Richard Helm NERFINISHED ⓘ |
| primaryGoal |
centralize complex communication between objects
ⓘ
reduce coupling between collaborating objects ⓘ |
| promotes |
loose coupling
ⓘ
open-closed principle ⓘ single-responsibility principle ⓘ |
| relatedTo |
Command pattern
NERFINISHED
ⓘ
Facade pattern NERFINISHED ⓘ Observer pattern NERFINISHED ⓘ |
| solves |
complex many-to-many object communication
ⓘ
tight coupling between colleague objects ⓘ |
| structure |
colleague objects hold reference to mediator
ⓘ
mediator holds references to colleague objects ⓘ |
| typicalImplementation |
Mediator interface with concrete mediator class
ⓘ
colleagues notify mediator instead of other colleagues ⓘ |
| typicalParticipants |
Colleague
ⓘ
ConcreteColleague ⓘ ConcreteMediator NERFINISHED ⓘ Mediator ⓘ |
| usedFor |
coordinating interactions in complex subsystems
ⓘ
decoupling UI components ⓘ |
Referenced by (3)
Full triples — surface form annotated when it differs from this entity's canonical label.