Tuesday, 19 April 2016

Mediator pattern - Behavioral


  • Define an object that encapsulates details and other objects interact with such object.
  • Define an object that encapsulates how a set of objects interact
  • promotes loose coupling by keeping objects from referring to each other explicitly, and it lets you vary their interaction independently.

        


Where to use ?
  • Partition a system into pieces or small objects.
  • Centralize control to manipulate participating objects(a.k.a colleagues)
  • Improve objects reusabilities
  • Simplify object protocols
  • The relationship between the control class and other participating classes is multidirectional.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.