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

xiaoxiao2021-03-06  35

Relying on the reverse principle is that it is necessary to rely on abstraction, do not rely on implementation.

The expression of relying on the reversal principle is:

Abstractions should not depend on the details; details should depend on abstraction.

Abstractness SHOULD NOT Deprond Upon Details. Details Should Depend Upon Abstractions.

Another expression is:

To programmatically, programming for interfaces.

Applying dependency reversal principles, the creation of the object is likely to use the object factory. This will result in a large number of classes, and maintenance of such systems need to be better-oriented to be better-oriented for unfamiliar engineers.

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

New Post(0)