里氏替換原則: 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.