Markus fdb9be1e76 Work towards #56: Add permalink to every pattern
This makes cleaner URLs thanks to jekyll
2015-08-15 18:03:05 +02:00

798 B

layout, title, folder, permalink, categories, tags
layout title folder permalink categories tags
pattern Mediator mediator /patterns/mediator/ pattern_cat pattern_tag

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.

alt text

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