Dependency Injection - suniladhya/Advantage GitHub Wiki
Concrete classes Must not be dependent on each other
Coupling
- The inter-dependency level of the classes, is called coupling. More is the dependency implies tight coupling & less is low coupling.
Benefits of DI
- Clean Code
Code is Easier to understand
- Better Re-usability
Low coupling Allows Modules to be Reused
- Better Unity Testing
Concrete classes can be replaced by mocks
- Low Coupling
Concrete classes can be replaced