1. SRP(Single Responsibility Principle 单一职责原则)
单一职责很容易理解,也很容易实现。所谓单一职责,就是一个设计元素(类)只做一件事。
2.OCP (Open-Close Principle开闭原则) 
“Closed for Modification; Open for Extension”——“对变更关闭;对扩展开放”。
3.LSP(Liskov Substitution Principle里氏替换原则)
Liskov于1987年提出了一个关于继承的原则“Inheritance should ensure that any property proved about supertype objects also holds for subtype objects.”——“继承必须确保超类所拥有的性质在子类中仍然成立。”
4.DIP (Dependence Inversion Principle依赖倒置原则)
 
5.ISP (Interface Segregation Principle接口隔离原则)
 
6.CAP(Composition/Aggregation Principle合成/聚合复用原则)
 
7.LD(Law of Demeter迪米特法则)