1, Commonjs is a kind of specification, NODEJS is the realization of this kind of norm.
1.1, CommonJS loading module is synchronous, so only the loading is complete to perform the subsequent operation.
2, AMD is REQUIREJS in the promotion process of the module definition of standardized output.
2.1, AMD asynchronous loading module.
3, CMD is seajs in the promotion process of the module definition of standardized output.
3.1, for the dependent module AMD is executed in advance, CMD is deferred execution. However, starting from 2.0, the Requirejs is also changed to be deferred (depending on how it is written, the processing does not pass).
3.2, the CMD respected rely on the nearest, AMD respected relying on the front.
4, UMD is the integration of AMD and COMMONJS.
4.1, AMD Browser The first principle of development of asynchronous loading module.
4.2, CommonJS module to the server first principle of development, choose synchronous loading, its modules without packaging (unwrapped modules).
4.3, this forces people to come up with another more general pattern UMD (Universal Module Definition). Want to solve the cross-platform solution. UMD first determines whether the module (exports) that supports node. JS is present, and the node. JS module pattern exists. In determining whether AMD is supported (define exists), the module is loaded using AMD mode.
The above is about the concept of JS understanding, follow-up in a deep attempt.
Reference:
Http://javascript.ruanyifeng.com/nodejs/module.html
Http://www.cnblogs.com/fullhouse/archive/2011/07/15/2107416.html
https://justineo.github.io/singles/writing-modular-js/
Https://my.oschina.net/felumanman/blog/263330?p=1
http://web.jobbole.com/82238/
Http://blog.gejiawen.com/2015/11/03/what-is-amd-cmd-commonjs-umd/?utm_source=tuicool&utm_medium=referral
https://www.zhihu.com/question/20351507
Http://www.cnblogs.com/mfc-itblog/p/5216820.html
1. For dependent modules AMD is performing ahead of time, and CMD is deferred execution. However, starting from 2.0, the Requirejs is also changed to be deferred (depending on how it is written, the processing does not pass).
2.CMD is highly dependent on proximity, AMD is highly reliant on pre-built.
On the concept of COMMONJS/AMD/CMD/UMD