3 ms·
Liked the fair simplicity of the post but I am disappointed by the Wikipedia links. Like many design pattern they look like Java special idioms used to overcome
by gbog 14y ago
Liked the fair simplicity of the post but I am disappointed by the Wikipedia links. Like many design pattern they look like Java special idioms used to overcome its limitations. So dependency injection is just "if x import y"? Like any other conditional, it must be used only if necessary but does it need be a Design Pattern?
- evincarofautumn 14y agoDesign patterns tend to arise due to linguistic limitations, but not always. They’re mainly a shared vocabulary for talking about software architecture and design, regardless of paradigm. As for dependency injection: DI ⊆ inversion of control ⊆ decoupling ⊆ factoring, where ⊆ = “is a kind of”. Roughly, DI means externalising dependencies and giving them as parameters in order to reduce coupling. Which, when you put it that way, is obvious, and something we (should) do often in any language.