3 ms·
Spring is not the only way to do DI. It's perfectly feasible to instrument your app at the top-level to pass the needed components down, and then use them thro
by mattgreenrocks 13y ago
Spring is not the only way to do DI.
It's perfectly feasible to instrument your app at the top-level to pass the needed components down, and then use them through interfaces. Thus, you pay the cost of the interfaces, plus the cognitive cost of using those interfaces, instead of implementation classes. Same effect as DI, but no container.
Aside: there are costs and benefits to a good software architecture, but you won't learn it from reading HN.