A little backbone for your app
Speaker: Luca Mearelli
Schedule: 2011, May 11, 17.30-18.30, Track 1
Other complete solutions have appeared to help structure the application logic and to help in those tasks less related with building the interface (examples are GWT, YUI, Cappuccino and SproutCore). They are well integrated and aim to create desktop-like web apps. A lot of built-in functionality is offered though somewhat they do it at the expense of flexibility (integrating with third party code) and they have a rather steep learning curve.
Backbone.js represents a middle ground between the full fledged application frameworks and the handmade application code. It provides a series of useful building blocks to help build the application without requiring too much of an investment in the framework from the start. Developers can cherry pick whichever parts are needed and integrate them easily with other libraries.
The library applies the principles of the Model-View-Controller pattern and implements classes and code to:
* represent and manipulate the data (Models),
* handle application structure and navigation (Control)
* build an event driven application (e.g. binding events to callback functions updating the View)
* provides a solid Collection class implementation which makes it easy to work with lists of objects (it extends Underscore.js for this),
* has methods to deal with syncing and persisting model data with a remote restful service
Last, but not least, Backbone.js is very easy to use together with other libraries dedicated to deal with the DOM and offers built-in integration with jQuery or Zepto (Moo tools integration is available through a fork of the library).
The talk will show an overview of the library and its main ideas and concepts, then we’ll explore its most interesting capabilities through the use of code examples.