1、Identify the aspects of your application that vary and separate them from what stays the same
2、Program to an interface,not an implementation
3、Favor composition over inheritance
4、strive for loosely coupled designs between objects that interact
5、classes should be opened for extension and closed for modification
6、depend upon abstractions,don't depend upon concrete classes
7、principle of least knowledge,talk only to your immediate friends
8、don't call us,we'll call you
阅读(416) | 评论(0) | 转发(0) |