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

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
Line 16: Line 16:
<li>Abstractions should not depend upon details. Details should depend upon abstractions.</li>
<li>Abstractions should not depend upon details. Details should depend upon abstractions.</li>
</ol>
</ol>
http://4.bp.blogspot.com/_rO0OuTtGb2Y/SVgyGeeYzwI/AAAAAAAAATM/NPsuTSArKIg/s400/DIP1.png

Revision as of 20:10, 14 November 2009

Dependency inversion principle

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. Goal of Dependency inversion principle is to decouple the high-level components from low-level components.


What is Dependency inversion principle?

Dependency inversion principle states that:

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

http://4.bp.blogspot.com/_rO0OuTtGb2Y/SVgyGeeYzwI/AAAAAAAAATM/NPsuTSArKIg/s400/DIP1.png