Single responsibility principle 单一功能原则
a class should have only a single responsibility (i.e. changes to only one part of the software's specification should be able to affect the specification of the class).
认为对象应该仅有一种单一功能的概念。
Open/closed principle 开闭原则
"software entities ... should be open for extension, but closed for modification."
认为“软件体应该是对于扩展开放,但是对于修改封闭”的概念。
Liskov substitution principle 里氏替换原则
"objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program."
认为“程序中的对象是可以在不改变程序正确性的前提下被它的子类所替换”的概念。
Interface segregation principle 接口隔离原则
"many client-specific interfaces are better than one general-purpose interface."
认为“多个特定客户端接口要好于一个宽泛用途的接口”的概念
Dependency inversion principle 依赖反转原则
one should "depend upon abstractions, not concretions.
认为一个方法应该遵从“依赖于抽象,而不是一个实例”。依赖注入是该原则的一种实现方式。