1. The principle of single responsibility: a category only does what it should do.
2. Rich's substitution principle: Subclasses must be able to replace base class (parent class), otherwise they should not be designed as their subclass.
3. The principle of dependency swap: Design depends on abstraction rather than concreteness.
4. Interface isolation principle: The interface should be small and special, not large and complete.
5. Open and close principle: A software entity such as classes, modules and functions should be open to extensions and closed to modifications.
6. Combination/aggregation and reuse principle: Try to use combination and aggregation, and use less inherited relationships to achieve the principle of reuse.
7. Dimit's Law: Low Coupling, High Cohesion.
The above is all the content of this article. I hope that the content of this article will be of some help to everyone’s study or work. I also hope to support Wulin.com more!