Mediator

If every object knew about every other object in an application because they make use of each other directly, it would make the code strongly coupled. The mediator pattern helps keep object loosely coupled by encapsulating the behaviours and interactions between objects.

Quick Reference

Pattern Name Mediator
Other Names
Classification Object Behavioral
Intent A mediator object is used to organize interactions between objects

General Structure

Example

results matching ""

    No results matching ""