-
Notifications
You must be signed in to change notification settings - Fork 3
Mediator Pattern
Pablo Garcia edited this page May 28, 2017
·
19 revisions
NOTE:
- The documentation is still ongoing.
- The examples can be wrong and change at any time.
The dictionary refers to a mediator as a neutral party that assists in negotiations and conflict resolution. In our world, a mediator is a behavioral design pattern that allows us to expose a unified interface through which the different parts of a system may communicate.
If it appears a system has too many direct relationships between components, it may be time to have a central point of control that components communicate through instead. The Mediator promotes loose coupling by ensuring that instead of components referring to each other explicitly, their interaction is handled through this central point. This can help us decouple systems and improve the potential for component reusability.