里氏替换原则: If for each object o1 of type S there is an object o2 of type T such that for all programs P defined in terms of T,the behavior of P is unchanged when o1 is substituted for o2 then S is a subtype of T.(若是对每个类型为S的对象o1,都有类型为T的对象o2,使得以T定义的全部程序P在全部的对象o1都代换成o2时,程序P的行为没有发生变化,那么类型S是类型T的子类型。)
依赖倒置原则: Dependence Inversion Principle.High level modules should not depend upon low level modules.Both should depend upon abstractions.Abstractions should not depend upon details.Details should depend upon abstractions.
接口隔离原则: Clients should not be forced to depend upon interfaces that they don't use; The dependency of one class to another one should depend on the smallest possible interface.
迪米特法则: Least Knowledge Principle
开闭原则: Software entities like classes, modules and functions should be open for extension but closed for modifications.