Object-oriented design principle

xiaoxiao2021-03-06  78

Design Principles:

1. "Open-Closed Principle, OCP)

2. Liskov Substitution PrinciPle, LSP

3. Relying on the principle of reverse (Dependency Inversion Principle, DIP)

4. Interface Isolation Principle (Interface SegRegation Principle, ISP)

5. Composition / AGGREGATION Principle, CARP

6. Dimit France (LAW of DEMETER, LOD)

The scalability of the system is guaranteed by the principle of 1, 2, 3, and 5.

The flexibility of the system is guaranteed by 1, 4, 6.

The plug-in property of the system is guaranteed by 1, 2, 3, and 5.

转载请注明原文地址:https://www.9cbs.com/read-71031.html

New Post(0)