Java面向对象16种设计原则
一 类的设计原则
1 依赖倒置原则-Dependency Inversion Principle (DIP)
2 里氏替换原则-Liskov Substitution Principle (LSP)
3 接口分隔原则-Interface Segregation Principle (ISP)
4 单一职责原则-Single Responsibility Principle (SRP)
5 开闭原则-The Open-Closed Principle (OCP)
二 包的设计原则
6 重用发布等价原则-Release ReuseEquivalency Principle (REP)
7 无环依赖原则-The AcyclicDependencies Principle (ADP)
8 稳定依赖原则-The StableDependencies Principle (SDP)
9 稳定抽象等价原则-The StableAbstractions Principle (SAP)
10 共同封闭原则-The CommonClosure Principle (CCP)
11 全部重用原则-The Common Reuse Principle (CRP)
三 扩展原则
12 迪米特法则 -Least Knowledge Principle (LKP)
13 黑盒原则- BBP(Black Box Principle)
14 缺省抽象原则 -DAP(Default Abstraction Principle)
15 接口设计原则 -IDP(Interface Design Principle)
16 不要构造具体的超类原则 -DCSP(Don't Concrete SupperclassPrinciple)