In continuation with the series on design pattern, I am currently going
through Behavioral Patterns. Today I will write about the Mediator
Pattern. You can read about rest of the patterns from the following
The Mediator patterns deals with providing a way for objects to
communicate with each other without knowing each others identity. The
participants involved in this pattern are a Mediator and Colleague. A
concrete colleague is used to communicate with other colleagues through
We can use the mediator pattern when we have objects are communicating
in a complex way or when we have to protect the identities of objects
who are communicating.
In my next post I will be writing about the Observer Pattern.