Hacker News new | ask | show | jobs
by bern4444 861 days 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.

1 comments

So that's what DI is. Took me 7years. Kidding!