O'Reilly logo

Backbone.js Patterns and Best Practices by Swarnendu De

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Working with Asynchronous Module Definition

So far, we have learned to add all our script files in HTML files within SCRIPT tags. The browser loads these files synchronously and hence we always need to ensure that if one file has a dependency over another file, the latter should always be loaded prior to the former. Since all of the references to these dependencies are made via global variables, these dependencies must be loaded in the proper order, and a developer must take care of them before he adds a new script file to the application. Although this process works just fine, it may become difficult to manage large applications as too many dependencies will overlap. AMD provides a solution to this problem.

AMD is a mechanism used to define a ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required