head first design patterns notes 1- Strategy Mode: Analog duck

1, a design principle: identify applications may require changes in place, put them independent, and do not need to change the code that mix. The principle is the spirit behind almost all design patterns.

  Another way of thinking of this principle: the change will be part of the package and remove them so that you can easily change or expand this section, the second does not affect other parts do not need to change.

 

2, the second design principle: for interface programming, rather than programming.

Guess you like

Origin www.cnblogs.com/xy-ouyang/p/11372399.html