
Software Design – The Mediator Pattern
We spend this episode looking at the mediator pattern. This is a pattern that provides a great deal of flexibility. However, it is not used as often as it should be. The implementation does not always lend itself to a mediator. Instead, the design needs to be thought through enough to create one. The Mediator Pattern Defined As always, we will start with the “Gang of Four” intent to set the stage for our discussion. “Define an object that encapsulates how a set of objects interact. Mediator promotes loose coupling by keeping objects from referring to each other explicitly, and it lets you vary their interaction independently.” It may be most comfortable to think of the mediator as a pattern that creates... Read more