2. Intent
â Define an object that encapsulates how a set of
objects interact.
â Design an intermediary to decouple many
peers.
â Promote the many-to-many relationships
between interacting peers
8. Pros & Cons
Pros:
â Decouples colleagues, which facilitates independent
variations of the colleague and mediator classes.
â Simplifies protocol by replacing many-to-many interaction
with one-to-one interaction
Cons:
â Reducing the complexity of Colleagues increases
the complexity of the Mediator itself.
9. Related patterns
â Observer: the Mediator class may be
implemented using an Observer
â Facade: is similar to a Mediator, but with one-
way communication from the Facade to its
subsystem classes..