Asynchronous module definition


Asynchronous module definition is a specification for the programming language JavaScript. It defines an application programming interface that defines code modules and their dependencies, and loads them asynchronously if desired. Implementations of AMD provide the following benefits:
In addition to loading multiple JavaScript files at runtime, AMD implementations allow developers to encapsulate code in smaller, more logically-organized files, in a way similar to other programming languages such as Java. For production and deployment, developers can concatenate and minify JavaScript modules based on an AMD API into one file, the same as traditional JavaScript.
AMD provides some CommonJS interoperability. It allows for using a similar and interface in the code, although its own interface is more basal and preferred. Universal module definition is a variant paradigm that takes advantage of these commonalities to support both AMD and CommonJS.
The AMD specification is implemented by Dojo Toolkit, RequireJS, and other libraries.