The core of LABJS is LAB (Loading and Blocking): Loading refers to asynchronous parallel loading, and Blocking refers to synchronous waiting for execution. Labjs through elegant grammar (script and wait) to achieve these two characteristics, the core value is performance optimization. LABJS is a file loader.
Requirejs and SEAJS are modular loaders that advocate a modular development philosophy, and the core value is to make JAVASCRIPT modular development simpler and more natural.
Module loaders can generally be degraded to file loaders, so the Requirejs and Seajs can also be used to achieve LABJS performance optimization.
Both Requirejs and Seajs are very good modular loaders, and the difference is as follows:
1. There is a discrepancy between the two positions. Requirejs wants to be a browser-side module loader and also wants to be a module loader for environments such as Rhino/node. Seajs is focused on the Web browser side and can be conveniently run on the node server side through node extensions
2. There are differences in the standards followed. Requirejs follows the AMD (asynchronous module definition) specification, SEAJS follows the CMD (Common module definition) specification. The difference between the specifications leads to the difference between the APIs. Seajs is more concise and elegant, closer to Commonjs modules/1.1 and Node Modules specifications.
3. There are differences in the concept of the community. Requirejs is trying to get the third party library to modify itself to support Requirejs, which is currently adopted by only a handful of communities. Seajs is not strong push, and adopt the way of independent encapsulation to "Haina Rivers", now has a more mature packaging strategy.
4. There is a difference in the quality of the code. Requirejs is no obvious bug,seajs is obviously no bug.
5. There are differences in support for debugging and so on. Seajs through Plug-ins, can realize the function of automatic mapping in Fiddler, also can realize automatic combo function, very convenient and convenience. Requirejs has no support in this respect.
6. There are differences in the plug-in mechanism between the two. Requirejs take is in the source code to set aside the form of the interface, the source code left for the plug-in and write. SEAJS's plug-in mechanism is the same as Node: open itself, so that the plug-in developers can directly access or modify, so very flexible, can implement various types of plug-ins.
There are a lot of details of the difference will not say more.
In short, SEAJS is simpler and more elegant than requirejs from API to implementation. If Requirejs is the Prototype class library, then Seajs is the JQuery class library.
Author: Yuber
Link: http://www.zhihu.com/question/20342350/answer/14828786