Ligament.js, the smallest, lightest-weight JS MVC Framework
gist.github.com
gist.github.com
More seriously, though, there seems to be a new javascript framework every day... and at some point I'm going to need to pick one for the project I'm working on. Its hard to tell which ones are appropriate for servers, vs clients, etc.
I wonder if anyone has made a directory of javascript frameworks?
I'm not looking forward to the task of going thru all the ones I've bookmarked over the past few months and trying to decide which are most appropriate, and which overlap each other, vs. which provide separate functionality that could be used together.
A simple reimplementation without http support looks something like:
Model.prototype.set = function(key, value){ this[key] = value; for(v in views){ v.refresh() } }
View.prototype.set_model = function(model){ model.views.push(this) }
thing = new Model();
view = new ViewSubclass();
view.set_model(thing);
thing.set('foo', 'bar'); # WOWZA THE VIEW UPDATES!!!11!!!For example, if the architecture you'd like to build only serves JSON and HTML templates, and javascript renders the rest, you save a lot on bandwith and cpu. The html is cached in the browser, the server only needs to produce JSON. Add a JSON based, restful DB, and you have an architecture that really fits what the web is becoming.
The JSON layer is perfectly suited for being the API layer other clients as well - otherwise you might have a lot of crufty code on the server that has to be cleaned up for use by any other client (e.g. native iPhone).
BTW - I believe the author of ligament also contributes to http://www.sproutcore.com/ and jQuery
Thanks for the downvote, whoever it was. If you have had a negative experience with ext.js or think it is not an appropriate candidate it would be nice to know.
Where it really excels is in support for IE6-8 - all of their controls, code etc just works, which is a godsend if you need to support these browsers.
I use a little jQuery, and I'm getting to the point where I'm ready to add a little more structure. But should I be using Backbone.js? Spine claims to be cleaner, but how do the communities/plug-ins compare? How does KnockoutJS compare? BatmanJS? Should I be abandoning jQuery for something more extensive like SproutCore or Sencha?
I'm also totally unclear on how compatible things are. A lot of the frameworks don't even seem to agree on basic things like how to do inheritance or whether they should use JavaScript or CoffeeScript. (Though I suppose they mostly don't break each others' namespaces any more.)
Is there some over-arching list of features that covers all of the existing frameworks, and that could be put into a table? If so, does such a table exist? If things are just a popularity contest, who is winning the popularity contest?
One way to get a good idea about how useful these frameworks are in practice is what's being built with them.
(I work on Backbone.js) You can take a look at the sort of apps folks are coming up with by scrolling through here:
http://documentcloud.github.com/backbone/#examples
... keeping in mind that Backbone hasn't even been out in the wild for a year yet, at this point.