I gave up writing my "JavaScript Applications" in a closure the way you see in this tutorial. The reason is, there's no good documentation tool that will parse it. I'd much rather use namespaces to keep my code from polluting the global namespace and then I can use jsDoc.
/** @namespace */
var MyApp = {}
/** My Class
* @constructor
* @param {Object} options
*/
MyApp.MyClass = function(options) {
...
};
It seems this is mostly about organizing your application consistently. It's easy (particularly with jQuery) to quickly amass large collections of event handlers which are later consolidated into the logic of an application. This library provides an abstraction to make it easier to switch that process around. Logic/API first; implementation second.
Of course you can still do that with plain jQuery...
[+] [-] Hipchan|15 years ago|reply
[+] [-] euroclydon|15 years ago|reply
[+] [-] MatthewPhillips|15 years ago|reply
[+] [-] MatthewPhillips|15 years ago|reply
[+] [-] rojoca|15 years ago|reply
Of course you can still do that with plain jQuery...