Why do we need dependency injection?

Why do we need dependency injection?
Answer
Dependency injection is a programming technique that makes a class independent of its dependencies. … That enables you to replace dependencies without changing the class that uses them. It also reduces the risk that you have to change a class just because one of its dependencies changed.
 

Tìm kiếm

Back
Top