Seven principles of object-oriented design (including SOLID principles)

preamble

The design concept varies from person to person
. The use of basic principles can also be arranged and combined according to your own situation
.

Overview

1. 单一职责原则(Single Responsibility Principle)
2. 开闭原则(Open Close Principle)
3. 里氏替换原则(Liskov Substitution Principle)
4. 接口隔离原则(Interface Segregation Principle)
5. 依赖倒置原则(Dependence Inversion Principle)
6. 迪米特法则(Law Of Demeter)
7. 组合/聚合复用原则(Composite/Aggregate Reuse Principle CARP)

Detailed

Everyone has different opinions, and some authors do not strictly follow the principles. Don't go into details, just post the link.
Article 1: This article is written simple and easy to understand
https://www.cnblogs.com/suli0827/p/9515842.html
Article 2: This article is written very professionally
https://www.cnblogs.com/cainiao -chuanqi/p/10959800.html
Article 3: This article is very well written
https://blog.csdn.net/hsysir/article/details/85252639

Guess you like

Origin blog.csdn.net/u013947963/article/details/109820833