I\'m developing a simple tree-structured database and I\'m usually setting dependencies or optional settings via a Builder (Builder pattern). Now I\'m not sure when to use for i
I have started using builder for most of my projects and it turns out I can and have replaced all of my DI with builders and singleton.
ie:
AppContext appContext = new AppContext.Builder() .setProperties(testProps) .setDB(testDB) .build(); // run tests
My code has become much simpler to manage without DI.