3 ms·
With dependency injection you dont need factories.IoC containers will make write you way less code.And they scale better.
by aikah 12y ago
With dependency injection you dont need factories.IoC containers will make write you way less code.And they scale better.
- mangecoeur 12y agoYou might not need factories, but they get foisted on you anyway. But the proliferation of "programming patterns" in java I think is symptomatic of a basic user-unfriendliness in the language. Off the top of my head I can think of three Patterns just for creating objects (Factories, DI, Builders) - the fact that these are even required, that object creation isn't self evident, suggests there's something wrong in the language design