Understanding RequireJS for Effective JavaScript Module Loading
原文见: Understanding RequireJS for Effective JavaScript Module Loading
一篇不错的介绍在rich client application项目中引入RequireJS的必要性。 RequireJS的主要用途:
- 通过简单的一个define()函数,引入模块化编程
- 通过下列方式,处理模块间的依赖 define(, function(A, B, C){ return xx;// xx can be any JS object like "string", 123, function(){}... })
define() 与 require()的区别详见原文