Mediator behavioral pattern ---

 

 

 

3 related patterns

(1) Mode intermediary model and appearance

     These two modes are similarities, there are very different appearance patterns is used to encapsulate a plurality of internal sub-plurality of modules, object is to provide easy to use interface for the external subsystem. That the appearance of the package is the pattern of interaction between subsystems and external subsystems internal module; is the intermediary model of interactions among colleagues encapsulated object provides a plurality of equal, is generally used on the inside to achieve Furthermore, the appearance of the pattern is interact one-way, from the external subsystem is to call internal subsystem, will not be the opposite of; the intermediary model implementation is multi-directional interaction between the plurality of internal modules

(2) intermediary model and observer mode

    These two modes can be combined. Intermediary model can be used in combination observer mode to achieve the object is changed when a colleague, informing the intermediary target, so that the intermediary objects to interact with other objects.

Guess you like

Origin www.cnblogs.com/youngao/p/11401213.html