Dependency Inversion Principle

DIP 

  • High-level modules should not import anything from low-level modules. Both should depend on abstractions
  • Abstractions should not depend on details. Details (concrete implementations) should depend on abstractions
  • DI is about wiring, IoC is about direction, and DIP is about shape. - Martin Fowler
Easy Extension and Decoupling




Comments