Comment

Comment by mateuszf

> Any kind of injection of dependencies should be done via an explicit method/constructor parameter.

I would go further and always recommend manual DI - that is passing the objects and creating them in code rather than depending on some magic framework to do the job. That makes understanding / analyzing / fixing bugs a lot easier.

It's actually not that hard / boilerplate-y to do even in Java (which is what we do in our team).

parent mateuszf 7 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton