Curriculum design patterns Design patterns succinctly explain 24-1 intermediary model


1 The course explains

1.1 Type:

1.2 Definitions:

1.3 application scenarios:

1.4 Advantages:

1.5 Disadvantages:

1.6 Mediator related design patterns

 

 

 


1 The course explains
1.1 Type:

Behavioral

 

1.2 Definitions:

◆ package defines a set of objects how objects interact
◆ expressly referenced by another object is to facilitate loose coupling, and allow independent change their interaction

 

 

 

 

1.3 application scenarios:

There are complex relationships between objects ◆ reference system, the confusion generated by the structure of interdependence and difficult to understand
◆ interaction of public behavior, if you need to change the behavior of intermediaries who can add new classes

 

Such as chat rooms, chat rooms there are 10 people, I just need to say a word in a chat room you can, do not need to say a word with 9 other individuals respectively

 

 

 

1.4 Advantages:

◆ will be converted into one-to-many, reduce the complexity of the program
decoupling between classes ◆

 

 

1.5 Disadvantages:

◆ intermediaries too much, resulting in complex systems

 

 

 

 

1.6  Mediator related design patterns

◆ intermediary model and observer mode

Observer mode to achieve communication between the intermediary role model

 

 

Guess you like

Origin www.cnblogs.com/1446358788-qq/p/12359872.html
Recommended