5 ms·
I agree. Dependency injection is 'just' passing an argument to a function or method. Whether that happens via the constructor, some method, or a plain ol' fun
by bern4444 3y ago
I agree.
Dependency injection is 'just' passing an argument to a function or method.
Whether that happens via the constructor, some method, or a plain ol' function, its very simple.
But naming it dependency injection and ascribing terms like setter injection, or constructor injection or discussing dependency injection frameworks with complicated set up instructions, can make this very simple concept seem significantly more complex and difficult for junior and mid level engineers.
All my opinion but this was also my experience.
- megamix 3y agoSo that's what DI is. Took me 7years. Kidding!