Chapter 10. Mediator

Ordinary OO development distributes responsibility as far as it will go, with each object doing its own work independently. The OBSERVER pattern supports this distribution by minimizing the responsibility of an object that other objects find interesting. The SINGLETON pattern also resists the distribution of responsibility and lets you centralize responsibility in particular objects that clients locate and reuse. Like SINGLETON, the MEDIATOR pattern centralizes responsibility, but for a particular set of objects rather than for all the clients in a system.

Providing a central authority for a group of objects is useful when the interactions between the objects gravitate toward the complex condition where every object is aware ...

Get Design Patterns in C# now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.