We should move it to a module sort of approach where horizon.js creates the base Horizon object/namespace and then individual modules can add on to that on an as-needed, page-by-page (need-by-need) basis.
Any new code or functionality added to the JS would be done in their own (or respective) modules. EG: a module for quote related JS. Horizon.Quota = {}; Which would encapsulate anything related to Quotas and live in its own quota.js file and would be "Required" as it was needed by the individual pages.
We should using something like: http:// requirejs. org/
We should move it to a module sort of approach where horizon.js creates the base Horizon object/namespace and then individual modules can add on to that on an as-needed, page-by-page (need-by-need) basis.
Any new code or functionality added to the JS would be done in their own (or respective) modules. EG: a module for quote related JS. Horizon.Quota = {}; Which would encapsulate anything related to Quotas and live in its own quota.js file and would be "Required" as it was needed by the individual pages.