JavaScript OO Design
javascript
Solution
I would recommend a module-loading framework. RequireJS is a popular option for this, used by the Dojo Toolkit. Using RequireJS, the AMD (Asynchronous Module Definition) loader will auto-load dependencies for you and you can also define your own modules.
If you're familiar with other programming languages, `require` is the counterpart to `import` or `#include` but in the web, this is asynchronous. This makes management easier (dependencies are explicit rather than implicit) and you don't need to worry about the order of your javascript files.
Problem
So I am creating a complex application with JavaScript. I am using an OO design so the majority of my code is in different files for maintainability. How can I import all of the files that I need to create my application?