I see a lot questions around the use of dependency injection but never understand the purpose. Why do we need extra code to make this work:
this.store.filter(...)
while all we need is
App.store.filter(...)
Other than some syntactic sugar, and forcing decoupling, I don’t see any apparent reasons for this (but I am new). Does this make testing easier, or design more modular, or prototyping new apps more hassle free? Not quite sure.
The downside of this approach is it makes the framework so much more complex. Thinking more broadly, why people often consider Ember having a steep learning curve, in my opinion, is it is full of this kind of “unique features”. Imagine if we don’t have dependency injection, how many questions would have been eliminated here in the forum.