The evolution of JS Modular programming
Blog post:
1 Traditional modularity: http://www.ruanyifeng.com/blog/2012/10/javascript_module.html
2 AMD Spec: http://www.ruanyifeng.com/blog/2012/10/asynchronous_module_definition.html
3 requirejs:http://www.ruanyifeng.com/blog/2012/11/require_js.html
There are now two large modular specifications that are used in the context of specific considerations
CMD: Synchronous loading module, mainly considering that the module JS file loading time is very short, and there is no UI in the build environment to use, because the presence of the UI, synchronous loading will cause the UI suspended animation, such as Nodejs programming
AMD: In the presence of UI situations to prevent the synchronous loading of JS module caused by the UI suspended animation, the asynchronous loading, loading completion callback to implement
Evolution path of front-end technology
1 Basic entry: HTML as UI skeleton, CSS as UI style appearance, JS as logical interactive processing
2 jquery as the primary JS first layer package, on the basis of blocking browser compatibility, add some convenient API, mainly provide selector extension, CSS style processing, DOM operation (add and delete search), DOM event, extensibility jquery Plugin
3 Modular Programming: AMD,CMD specification, where AMD Representative Requiresjs,cmd represents SEAJS
4 Early MVC framework: Backbone,underscore
5 powerful MVC framework: Angluarjs,vuejs
6 Mobile Evolution: Zeptojs (Mobile-side jquery)
7 CSS Evolution: less syntax
8 JS Evolution: TS Syntax
JS Modular Programming