What people don’t know about dependency injection
The main goal of dependency injection (DI) is decoupling — you decouple a certain class from the client that is using that class. This is usually done in conjunction with interface-based-programming.
In this article I’ll explain what DI is really all about and show you different ways of how to do it and discuss the advantages and disadvantages. At the end I’ll also explain the limitations of DI.