Login :
Password :

Design patterns


Static diagram :

Static diagram

Description :

Type :  Be  (Behavioral)
Intent : 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.
Applicability : Use the Mediator pattern when :
- a set of objects communicate in well-defined but complex ways. The resulting interdependencies are unstructured and difficult to understand.
- reusing an object is difficult because it refers to and communicates with many other objects.
- a behavior that's distributed between several classes should be customizable without a lot of subclassing.

Strong points :

  1. 1. Extensibility
    1. 1.1 Decoupled colleagues
    2. 1.2 Mediator's protocol factorization
  2. 2. Simplified management
    1. 2.1 Simplified object protocols
    2. 2.2 Minimal number of exchanged messages

Pattern's participants :

Spoiled patterns :

  1. 1. Complete collaboration between concrete colleagues

Problems :

  1. 1. The control tower
Les têtes de mule