Some principles for object-oriented type design

zhaozj2021-02-16  82

Object-oriented type of object-oriented design in "Agile Software Development - Principles, Mode and Practice":

Single Responsibilities: For a class, there should have only one reason that caused it.

Open, Closed Principles: Software entities (class, modules, functions, etc.) should be extended, but cannot be modified.

Liskov replacement principles must be able to replace its base type.

Relying on the inverting principle a. The high-level module should not depend on the low-level module, both of which should depend on abstraction. b. Abstraction should not depend on the details, the details should depend on abstraction

Interface Isolation Principles: It should not be forced customers to rely on how they don't need.

English article can find Chinese on the Objectmentor's website to find the electronic magazine of the C View site.

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

New Post(0)