I have recently worked on a Python project where we did dependency injection heavily (because we must in order for the app to be testable), but we didn't use any framework. At times it was a little tedious to wire up all the dependencies manually, but overall it worked great.When an object had to be created in multiple places, we simply had a function (sometimes a class method of that object) to create a production instance. This function was called whenever we needed that object.In the tests, we did the same thing: if multiple times we needed to create a 'test-version' of an object (i.e., a real instance backed by mock objects), we had a function to create this 'test-version' of a class, to be used in tests.As I said, generally this worked fine.I am now entering a new Java project, and we are deciding whether to use a DI framework, or do DI manually (like in the previous project).Please explain how working with a DI framework will be different, and in what manners it is better or worse than manual 'vanilla' dependency injection.Edit: I would also like to add to the question: have you witnessed any 'professional level' project that does DI manually, without a framework?
Dependency injection: should I use a framework?
java;dependency injection;frameworks