G.Dependency Inversion Principle (DIP)

  1. Summary
    1. Both High level and low level modules should be dependent on a common abstraction or interface
    2. Usually most of class diagrams are designed from top to bottom and but there is an OO principle “Be dependent on abstraction instead of concrete classes”   that reverse this diagram and that is called dependency inversion.
    4. Abstractions should not depend on details. Details should depend on abstractions.
  2. Applicability
    1. Interface Design
  3. Example 
    1. Pizaa Store Design
  4. Related Concepts 
    1. Inversion of Control (IOC) : A Design Guidelines that further augment DIP
    2. Dependency Injection : One of the approach to achieve IOC
    3. Service Locators : Another approach to achieve IOC 
    4. Factory Pattern : A design pattern that implement IOC
  5. References 
    1. http://www.lostechies.com/blogs/gabrielschenker... 
    2. http://www.oodesign.com/dependency-inversion-principle.html
    3. http://richnewman.wordpress.com/2007/08/04/....