From the new 4.2 docs
Request clarification please.
The list of namespace prefixes used in the application to resolve dependencies like Views and Stores:
You don't need to include main namespace (MyApp), it will be added to the list automatically.
There is a fair bit of discussion in the docs, I have had pain here as I learned.
controllers: [ 'Common.code.controller.Foo', 'Bar' ]
models: ['Foo'], // Loads Common.code.model.Foo
views: ['Bar'] // Loads Common.code.view.Bar
models: ['Foo'], // Loads MyApp.model.Foo
views: ['Bar'] // Loads MyApp.view.Bar
So it is hard to be certain what was due to ignorance vs what is now fixed or improved.
May I ask, what is the point here, why are we doing this?
a) we get setters and setters "for free".
b) models and stores are instantiated in the getter if they do not exist. But not views.
...so this is shorthand for requiring and creating?
Why is it that you want these config arrays to contain unqualified names?
There are so many places to "resolve dependencies" I have lost it.
Changing one upsets the others and around in circles I go.
The application has name, namespaces, paths, appfolder and now this.
And still the dependencies are a problem.
Yet there they are in an organized files system.
I do not have a great deal of real-world experience (I can't get a fricking product out the door), but it seems to me it would be very simple to have one namespace and I reach into it by completely specifying a path. If I want cool/code/controller.js then I write require [''cool.code.Controller'].
Why the complications and automation?
What does this buy me?
Why do I want to hide information from myself?
models: ['Foo'], // Loads Common.code.model.Foo Surprise!! You thought it was something else!