Backbone.persistence is a simple adapter to use Backbone.js without using the REST persistence layer.

Backbone is great, but not only for applications that use a remote persistence mechanism, for example, the demo TODO app uses the HTML5 localStorage instead of the usual REST layer.

Sometimes you don't even need to use localStorage, for example, when you don't need to save data between two different sessions for the same user. If you want to run your unit tests using Rhino using Jenkins, you can't use things like localStorage.

That's where Backbone.persistance comes in, it overrides Backbone.Sync to persist all the data in memory instead of using a persistence mechanism.

You can download Backbone.persistance at my github repository.



comments powered by Disqus