Jeffrey Bakker
Dec 14, 2022

--

Those are some harsh words for a well-founded solution that solves much bigger problems than it creates.

What’s lazy is to do it like before DI and IoC containers came around: to have ad-hoc creation of objects, with no explicit distinction of lifetime scope, nor plan for scalability. And abuse of singleton classes.

Some of the most unmaintainable, untestable, bug-infested code I’ve seen, was written in the absence of DI/IoC. IME, code without DI usually needs refactoring to expand or add tests to. And if the code is very old, the refactor is very difficult, sometimes impossible by then.

You’re the first person I’ve encountered to seem to understand the topic well and still disagree with it. Will be interesting to see what you propose instead in your next article.

--

--

Jeffrey Bakker
Jeffrey Bakker

Written by Jeffrey Bakker

Professional geek. Wannabe cyclist.

Responses (1)