CSDN博客

img wangjiong

Mediator

发表于2004/9/14 14:54:00  557人阅读

分类: Design Patterns

Benefits:
• It decouples colleagues.
• It simplifies object protocols.
• It centralizes control.
• The individual components become simpler and much easier to deal with because they do not need to pass messages to one another.
• The components do not need to contain logic to deal with their intercommunication and are therefore more generic.

Applicable Scenarios:
• A set of objects communicates in complex but well-defined ways.
• Custom behavior distributed between several objects is required without subclassing. It is commonly used structurally in message-based systems. The messages themselves are the means by which related objects are decoupled.

0 0

相关博文

我的热门文章

img
取 消
img