Why Use Dependency Injection
suggest change- Fast Development process
- Decoupling
- Unit test writing
Fast development Passing collaborators in keeps modules smaller, so people conflict less when they edit them.
Decoupling Modules become less coupled, so they are easier to maintain.
Unit tests A test can pass a substitute instead of a hardcoded dependency.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents