Monday, May 17th, 2010
RequireJS 0.11 Released; Ready for jQuery
<>p>James Burke is moving quickly with his RequireJS library. He recently posted about the requirements that John Resig has for a script loader for jQuery:- script loading must be async
- script loading should do as much in parallel as possible. This means in particular, that it should be possible to avoid dynamic nested dependency loading.
- it looks like a script wrapper is needed to allow #1 and #2 to work effectively, particularly for cross-domain loading. It is unfortunate, but a necessity for script loading in browsers.
With the RequireJS 0.11.0 release James feels like he has the features to make that real:
- There is a new priority config option to indicate priority, parallel download of build layers.
- A new JSONP plugin allows you to treat any JSONP service as dependency.
- require.js should be Caja-compliant. The plugins may not be, but the main require.js file passed cajoling on http://caja.appspot.com/.
- Instructions and optimization support for renaming require().
- There is a new RequireJS+Transport D download option that supports the CommonJS Transport D proposal. This can be useful in conjunction with the server-side Transporter project.
James mentioned a server side scanning tool…. and Kyle Simpson (of LABjs) is almost ready to show something there too.
Related Content:











Minimalism is certainly a good thing when defining a standard, if there is less stuff to agree on then that standard will be more successful, just look at JSON.
I think there is too much to the CommonJS project, which will ultimately make it much less successful, the module system is simply too complicated, there is too much to agree on, too many introduced keywords, too many “transport” formats.
There is too many topics, too many proposal letters, too many version numbers, and too much to each of the proposals. CommonJS should be minimal and simple so as to simplify life for JavaScript users, otherwise what good is it?
@ jhuni – +1
Simplicity is hard to come by. HTTP, HTML, REST, JSON, etc. stood the time test due to their simplicity although they were never perfect.
We had implemented a similar loader and module library for the JS in the older days. Although its not as feature rich as this, it meets our needs :)
http://code.google.com/p/jaf