Reputation: 123
I am studying about Dependency Injection, I realize that exists frameworks (dagger 2, spring, etc...) to make the Injection of objects, since I can achieve it by constructors, get/set, e.g. What is the advantage of using a framework/library to do it?
Upvotes: 1
Views: 46
Reputation: 2460
You can archive dependency injection without any framework.
The points of the frameworks are to keep your code simple(r) to read and to speed up development. It is easier to just add @Inject on a field and add @Provide on a method then write it all yourself.
Upvotes: 1