7 ms·
> Any kind of injection of dependencies should be done via an explicit method/constructor parameter. In this article, that's the only kind of injection mention
by brlewis 7y ago
> Any kind of injection of dependencies should be done via an explicit method/constructor parameter.
In this article, that's the only kind of injection mentioned. I realize a lot of the times people talk about DI they're referring to magic injectors like Spring's, but in this article, and in the Wikipedia article on DI, DI and magic are not synonyms. When the injector is just the constructor that's still DI, but it isn't an anti-pattern.