软件设计原则摘要备忘

178 阅读1分钟

参考:time.geekbang.org/column/arti…

1不要重复自己Don't Repeat Yourself
2保持简单Keep It Simeple, Stupid
3面向接口编程Program to an interface, not an implementation
4避免过度设计Yon Ain't Gonna Need It
5迪米特法则Law of Demeter
6单一职责Single Responsibility Principle
7开闭原则Open/Close Principle
8里氏替换Liskov substitution principle
9接口隔离原则Interface Segregation Principle
10依赖倒置原则Denpendency Inversion Principle
11共同封闭原则Common Closure Principle
12共同重用原则Connon Resue Principle
13好莱坞原则Hollywood Principle
14高内聚,低耦合High Conhesion & Low/Loose coupling
15惯例优于配置Convention over Configuration
16关注点分离Separation of Concerns
17契约式设计Design by Contract
18无环依赖Acyclic Dependencies Principle