Spring does a lot of things Dependency Injection is at the heart of the spring framework. Dependency injection was commonly referred to by another name: inverse of control.
It is the acquisition of dependencies that being inverted. Based on that revelation, the term which better describe the phrase 'Dependency injection' is “what is going on.”.
Dependencies are injected into objects so again DI means “An inversion of responsibilities with regard to how an object obtains references collaborating objects”. The key benefit of DI is loose coupling. If an object only known about its dependencies by their interface .than the dependency can be swapped out without a different implementation without the dependency object knowing the difference.
For Further Reading,
0 comments:
Post a Comment