Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

backbone-data

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

backbone-data

A simple data store for backbone models and collections inspired by Ember Data and angular-data.

  • 0.0.10
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Backbone Data

Build Status

A simple data store for Backbone models and collections inspired by Ember Data and angular-data.

Key Features

  • Automatic Caching and Identity Mapping
    • If a model had already been loaded, asking for it a second time will not make any network requests. This minimizes the number of round-trips to the server.
  • Provides a single point of entry for data access through the global variable DS and works with existing Backbone models and collections.
  • Manages singletons for models and collections
    • Many times you'll need the same collection instance in multiple views. Just ask the store for the resource (DS.getAll('person'), DS.findAll('person')) and it will return or resolve with the same collection instance each time.
    • Maybe you have a single model instance in your application, like a UserProfile model. The data store can also manage it as a singleton so that you get the same UserProfile instance every time.
  • Load models into the store as incomplete. This can be useful if your models have lots of data and not all of it is served upfront. Extra details about the model can be fetched and cached for subsequent requests.
  • Easily create new filtered collections that are chainable
  • AMD compatible
  • 933 bytes gzipped and minified

API Documentation and Examples

Install

Grab the minified or unminified file from the dist directory and include it on your page.

<script src="dist/backbone-ds.min.js"></script>

Or install through Bower

bower install backbone-data

Or install through NPM

npm install backbone-data

This library exposes a global variable called DS (Data Store) and it is also registers itself for AMD (Require.js).

Tests

Tests are using Mocha, Chai, and Sinon. Run tests with karma.

bower install
npm install
karma start

Build

This will create the distribution files in the dist folder

gulp

Keywords

FAQs

Package last updated on 13 Jun 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc