Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Backbone extensions to support local MongoDB back-end storage

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .gitignore
Octocat-spinner-32 README.md
Octocat-spinner-32 backbone-mongodb.js
Octocat-spinner-32 index.js
Octocat-spinner-32 package.json
README.md

Extensions to Backbone.js to support MongoDB use as a back-end data store.

Overview

Adds Backbone.Document and Backbone.EmbeddedDocument for working with MongoDB data:

  1. embedded documents are wrapped in the correct objects if desired; nesting is supported
  2. embedded documents support a minimum of features for accessing the root
  3. all changes are made through the root document

Co-exists with Backbone Models, which remain unchanged.

Server Side (node.js)

When loaded on a node.js server (where node-mongodb-native is available), provides:

  1. save, fetch, and delete methods that follow the standard node callback pattern: callback(err, response)
  2. support for loading from and saving to the mongodb

Client Side

When loaded on the browser, provides:

  1. access to the same methods (validation, etc) that the server has
  2. Backbone.js sync support for document-level

Credit

Structural credit and general props for writing beautiful code to jashkenas and the Backbone.js crew.

Something went wrong with that request. Please try again.