This chapter focuses on the way Backbone.js synchronizes models and collections with a RESTful backend, or stores them in the HTML5 local storage.
We will learn how to design the REST API for our backend, which can be implemented with almost any programming framework, such as Symphony, Ruby on Rails, Django, or Node.js.
Throughout the chapter, we will use MongoLab (http://mongolab.com), which is the cloud version of MongoDB, with a RESTful interface. We will also learn what tools to use to debug the RESTful service when the frontend app has not been built yet.
Finally we will make the Backbone application communicate with the RESTful service, performing full set of CRUD operations supported by the REST server. We will also learn how to use the polling technique to update data in a collection in the application dynamically.
We will also discuss about an extension that allows us to keep data in HTML5's local storage instead of keeping them in the remote server.