The difference Command AMD CMD

command is a server, such as synchronous nodejs

AMD and CMD is the browser side, is asynchronous, such as requirejs

commandJS server module is standardized, this specification will use the node, a separate file is a module, load modules require. command load modules are synchronized to perform the operation back after all the loads are executed. command is mainly used for programming the server so a lot of files to be loaded already exists on a local disk, and load up faster, regardless of asynchronous loading. The browser add-way asynchronous loading file used. AMD, CMD coming

AMD is the standardization of output RequireJS in the promotion process of the module definition of 

AMD asynchronous loading module. It supports all types of modules module object constructor function like strings JSON

 

AMD is dependent module for execution in advance, CMD is deferred execution.

 

Guess you like

Origin www.cnblogs.com/theworldofbeisong/p/11210938.html