Knockout.js vs Backbone.js
stackoverflow.com
stackoverflow.com
For an idea of scale, we have: ~60 backbone views, ~120 javascript templates (underscore jst), ~30 backbone models + collections, 1 controller (the router)
And we have a fairly complex system of white-labeling that allows us to swap out javascript templates and augment view functionality for partner sites [2] and local sites [3] without adding a lot of overhead.
The combination of Backbone + Underscore + Jammit with Rails/Rack on the backend is working great. Even developers who are not familiar at all with Backbone and the ajax app, can dive in and understand everything pretty quickly.
Can't possibly recommend it highly enough, if you 1) are comfortable with Javascript, and 2) prefer to roll most of your own code so that you're not beholden to bulky rigid frameworks.
There are some quirks that annoy me, but overall I can't complain. One of these days when I have some more free time, I'll try and write a series of posts explaining how we're using it and our key learnings.
[1] http://earbits.com [2] http://sfgate.earbits.com [3] http://la.earbits.com
But, after reading some of those answers, I'm very happy to see that you can now work with a fork of "unobtrusive" knockout. I'll definitely have to give it another chance.
http://maccman.github.com/spine/
It's smaller than Backbone and IMHO also makes you write cleaner code. It has real controllers as well. Backbone has routes instead which works for a data-driven page-based application (say a CMS or something) but doesn't work that well for more GUI-like stuff (like a media player).
Unfortunately it doesn't have a big community and many users like Backbone.
One of the cool things is that Backbone models and views can be quite easily used also on the server-side with Node.js. In some applications both sides use the same models, with Backbone.sync being the difference - on client you communicate with AJAX, on server you communicate with a custom database connector.
It's coming to be very organized, but it makes the LOC bigger.
Also for starters I suggest that you have a look at some dependency management library like requireJS, if your code base its going to be big, you better get started with dependency management.
Good luck!
I'm working on a small project and while the code I'll write is small, my stack is rather colorful.