Single Responsibility Principle
(SRP) a class, it is best to do only one thing, there is only one reason for its change.
Open-closed Principle
(OCP: the open-closed principle) software entities (classes, modules, functions, etc.) should be extensible, but cannot be modified.
Dependency reversal Principle
(DIP) the content of this principle is: to rely on abstraction, not on specifics. Or, you need to program the interface instead of implementing the Program (program to an interface, not an implementation ). The high-level module should not depend on the underlying module, and both should depend on abstraction.
Rishi replacement principle
(Liskov substitution principle, LSP) in a software system, subclass should be able to replace any location where the base class can appear, and after replacement, the code will work normally.
Dumit principles
6. Least knowledge principle (LKP) Minimum knowledge principle, also known as "law of Demeter". If the two classes do not need to communicate with each other directly, they should not directly interact with each other. If one class needs to call the method of another class, it can be forwarded by a third party.