CSC/ECE 517 Fall 2009/wiki3 5 SD: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 3: Line 3:


Dependency inversion principle states that:
Dependency inversion principle states that:
<li>
<ol>
<ol>High-level modules should not depend on low-level modules. Both should depend on abstractions.</ol>
<li>High-level modules should not depend on low-level modules. Both should depend on abstractions.</ol>
<ol>Abstractions should not depend upon details. Details should depend upon abstractions.</ol>
<li>Abstractions should not depend upon details. Details should depend upon abstractions.</ol>
</li>
</ol>


== Introduction ==
== Introduction ==


In conventional application architecture, lower-level components are designed to be consumed by higher-level components which enable increasingly complex systems to be built. In this composition, higher-level components depend directly upon lower-level components to achieve some task. This dependency upon lower-level components makes applications rigid, fragile and immobile.
In conventional application architecture, lower-level components are designed to be consumed by higher-level components which enable increasingly complex systems to be built. In this composition, higher-level components depend directly upon lower-level components to achieve some task. This dependency upon lower-level components makes applications rigid, fragile and immobile.

Revision as of 14:51, 14 November 2009

Dependency inversion principle

Dependency inversion principle states that:

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

    Introduction

    In conventional application architecture, lower-level components are designed to be consumed by higher-level components which enable increasingly complex systems to be built. In this composition, higher-level components depend directly upon lower-level components to achieve some task. This dependency upon lower-level components makes applications rigid, fragile and immobile.