7
Apr
Understanding Dependency Injection
The term dependency injection refers to a technique whereby the dependencies of one object are supplied – or injected – by another object. Instead of letting the client (the object that needs those dependencies) build or find the dependencies, the dependencies would be passed to the object. That’s the whole meaning of dependency injection – actually, a pretty simple concept. But let's have a deeper look.