Extensions to Backbone.js to support MongoDB use as a back-end data store.
Adds Backbone.Document and Backbone.EmbeddedDocument for working with MongoDB data:
- embedded documents are wrapped in the correct objects if desired; nesting is supported
- embedded documents support a minimum of features for accessing the root
- all changes are made through the root document
Co-exists with Backbone Models, which remain unchanged.
When loaded on a node.js server (where node-mongodb-native is available), provides:
- save, fetch, and delete methods that follow the standard node callback pattern: callback(err, response)
- support for loading from and saving to the mongodb
When loaded on the browser, provides:
- access to the same methods (validation, etc) that the server has
- Backbone.js sync support for document-level
Structural credit and general props for writing beautiful code to jashkenas and the Backbone.js crew.