Hard disagree. Spending design time on dependency management is time not spend on more import design decisions.
The problem with dependency injection frameworks
21–30 of 92 posts
Re: The problem with dependency injection frameworks
#22Re: The problem with dependency injection frameworks
#23At work, all of my function has at most 3 parameters: deps (dependencies), params (for parameters), ctx (for context), which covers all of my use cases, easy to test, debug, isolate.
Re: The problem with dependency injection frameworks
#24> I need to know everything that’s going on in my code. I need simple, straightforward function calls. Nothing else! I want to be able to start at main() and trace through the code. I want to look at callers and find where every parameter came from. Reading code is hard enough already. Magic frameworks make it harder. But these frameworks aren't magic. They're just code. Sure it means you have a bit more code to read…
"Magic" in framework parlance doesnt mean hocus pocus. It just means concealed abstraction.
Re: The problem with dependency injection frameworks
#25At work, all of my function has at most 3 parameters: deps (dependencies), params (for parameters), ctx (for context), which covers all of my use cases, easy to test, debug, isolate.
Can you give an example of a function?
Re: The problem with dependency injection frameworks
#26Even today I work with half baked frameworks that have the same problem and I hate it.
The difference is that when something like, say, a web framework does this it is buying me something valuable in exchange for the frustrating occasions when the magic fucks up requiring deep dive debugging.
DI frameworks that do this buy you nothing of value except the paternalistic approval of people who dont have the imagination to think beyond unit tests.
Re: The problem with dependency injection frameworks
#27Re: The problem with dependency injection frameworks
#28https://jakarta.ee/specifications/cdi/3.0/jakarta-cdi-spec-3...
I would use a DI or a language that _didn’t_ have a spec or you would experience the things in the two articles people fear.
Re: The problem with dependency injection frameworks
#29Dependency Injection is just a fancy, obfuscating, name for global variables.