专栏 - 设计模式
-
开闭原则(OCP)
Software entities should be open for extension,but closed for modification....
-
里氏替换原则(LSP)
Inheritance should ensure that any property proved about supertype objects also holds for subtype objects....
-
依赖倒置原则(DIP)
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....
-
单一职责原则(SRP)
There should never be more than one reason for a class to change....
-
接口隔离原则(ISP)
The dependency of one class to another one should depend on the smallest possible interface....
-
迪米特法则(LoD)
Talk only to your immediate friends and not to strangers....
-
合成复用原则(DRP)
Composition/Aggregate Reuse Principle,CARP....