Westward Design Patterns - Strategy Pattern This chapter says it has defects

Westward Design Patterns - Strategy Pattern say this chapter does have flaws, for example, introduced in the context of the strategy pattern, from the class diagram, it is to combine multiple strategies, but in the text referred only to the

Hold a policy object, so that I Why not just use policy interface to it, why should it create a middle class with nothing of it, and my understanding is that the role of this class is used to aggregate multiple,

Algorithmic strategies, who play again combine multiple ability to form a whole, so it should be the existence of the middle class, and the strategy pattern combined with a simple plant, and sometimes do not use reflection

Optimization should be based strategy mode, bearers of a certain initialization function, if you use reflection, how to initialize policy class.

Guess you like

Origin www.cnblogs.com/wangchaodong/p/11962429.html