I am creating an application that has one global namespace:
var myApp = {};
Then I have a bunch of different reusable “modules” consisting of models, views, and controllers.
//Bar chart module code
org.example.chart.bar.module
org.example.chart.bar.model
org.example.chart.bar.view
org.example.chart.bar.controller
I also have a great syntax for dataSource and dataManager for loading data into dataSource:
org.example.data.dataSource
org.example.data.dataManager
And finally, the translation strings and settings that should be available in the application:
org.example.static.translations
org.example.static.settings
How would you (reconfigure) this so that I have easy access to application-level singles (e.g. dataSource, dataManager, translations, etc.) and can easily create reusable modules that fall under the current application instance?
( , , "" ? : myApp.translations = org.example.static.translations?)