19 March 2012
Backbone.js provides several classes (Model, Collection, View, Router) that you can extend to define the building blocks of your application. To build an application with Backbone.js, you first create the Models, Collections, and Views of your application. You then bring these components to life by defining a “Router” that provides the entry points of your application through a set of (deep-linkable) URLs.
With Backbone.js, you can organize your code in self-contained entities (Models, Collections, Views), in short—no more free-hanging and unrelated blocks of code.
With Backbone.js, you bind Views to Models so that when a Model’s data changes, all the Views bound to that Model automatically re-render. There is no more need for complex UI synchronization code.
Backbone.js also provides a natural, magical, and elegant integration with RESTful services. If you expose your back-end data through a pure RESTful API, the operations of retrieving (GET), creating (POST), updating (PUT), and deleting (DELETE) models are incredibly easy using the Backbone.js simple Model API.
In this three-part tutorial, you’ll create a Wine Cellar application that allows users to browse through a list of wines, as well as add, update, and delete wines.
Next, read Part 2: CRUD, so that you can learn how to add more functionality to this application.
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. Permissions beyond the scope of this license, pertaining to the examples of code included within this work are available at Adobe.