1. 面向接口编程,而不是面向实现编程
2. 组合优先于继承
3. 将经常变化的部分从不变的部分中分离出来
1. Identify the aspects of your application that vary and separate them from what stays the same
2. favor composition over inheritance
3. program to an interface,not an implementation
1. 面向接口编程,而不是面向实现编程
2. 组合优先于继承
3. 将经常变化的部分从不变的部分中分离出来
1. Identify the aspects of your application that vary and separate them from what stays the same
2. favor composition over inheritance
3. program to an interface,not an implementation