New developments in web app frameworks-Backbone.js
Okay, this is just a summary of a few things I’ve been made aware of recently that seem cool and useful. It’s wonderful to see how people are sorting out the most useful things these days, and, often, making them popular. Clearly presented, well-documented, well-designed things, that take off because of that. How nice.
There’s jQuery, which is beautiful, but it’s more a system for accessing the DOM, but is not inherently designed to talk with the server side, or manage data. This was one of the things I kept running up against a few months ago–for any variety of reasons, I need the server side (PHP in that case) to talk to the client side (jQuery). How, exactly, should I do this? It felt sloppy and home-grown.
Furthermore, it felt somehow inelegant to relate the data I wanted to store, directly with a series of selectors in the HTML. Yes, it did seem that that was how people did it; but it seemed counter-intuitive to my training.
This would be very useful if you want control over your code, but you want to do things elegantly. Or, because you’re trying to do a lot on the client side, like for example, GMail.
Here’s a great article about it: Building a single page app with Backbone.js, underscore.js and jQuery, by Henrik Joreteg.
Backbone also provides a RESTful API to allow a standardized way for your server and client sides to talk. That makes a lot more sense.