The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Getting started with modular javascript.. :? Reply To: Getting started with modular javascript.. :?


I like requirejs, which is an AMD implementation. It is nicely designed for use as a loader, and there are specific instructions for using it with jQuery (and jQuery plugins).

However, it works best as a “all-or-nothing” approach. Mixing with existing, globals-heavy code is difficult. You can use “shim” configurations, which “imports” global variables into module-like wrappers, but I’ve always found it problematic. And I have yet to use it for an exceedingly complex site.