Dependency Inversion Principle

In object-oriented programming, the dependency inversion principle refers to a specific form of decoupling where conventional dependency relationships established from high-level, policy-setting modules to low-level, dependency modules are inverted (i.e. reversed) for the purpose of rendering high-level modules independent of the low-level module implementation details. The principle states:

A. High-level modules should not depend on low-level modules. Both should depend on abstractions.
B. Abstractions should not depend upon details. Details should depend upon abstractions.

The principle inverts the way some people may think about object-oriented design, as both high- and low-level objects depend on the same abstraction.

Read more about Dependency Inversion Principle:  Description, History

Famous quotes containing the words dependency and/or principle:

    The history of work has been, in part, the history of the worker’s body. Production depended on what the body could accomplish with strength and skill. Techniques that improve output have been driven by a general desire to decrease the pain of labor as well as by employers’ intentions to escape dependency upon that knowledge which only the sentient laboring body could provide.
    Shoshana Zuboff (b. 1951)

    We have been here over forty years, a longer period than the children of Israel wandered through the wilderness, coming to this Capitol pleading for this recognition of the principle that the Government derives its just powers from the consent of the governed. Mr. Chairman, we ask that you report our resolution favorably if you can but unfavorably if you must; that you report one way or the other, so that the Senate may have the chance to consider it.
    Anna Howard Shaw (1847–1919)