All Projects → neebz → Backbone Parse

neebz / Backbone Parse

A Backbone plugin to make it work with Parse.com out of the box. 💥

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Backbone Parse

Fullstack Javascript
Source code for the Fullstack JavaScript book
Stars: ✭ 456 (+424.14%)
Mutual labels:  parse, backbone
Jsoup
jsoup: the Java HTML parser, built for HTML editing, cleaning, scraping, and XSS safety.
Stars: ✭ 9,184 (+10456.32%)
Mutual labels:  parse
Tika Python
Tika-Python is a Python binding to the Apache Tika™ REST services allowing Tika to be called natively in the Python community.
Stars: ✭ 997 (+1045.98%)
Mutual labels:  parse
Restfeel
RESTFeel: 一个企业级的API管理&测试平台。RESTFeel帮助你设计、开发、测试您的API。
Stars: ✭ 59 (-32.18%)
Mutual labels:  backbone
Money
Money - let's you manage your money and visualize where your money goes. Built using Ruby 2.3.0, Rails 4.2.5, Backbone and Bootstrap
Stars: ✭ 48 (-44.83%)
Mutual labels:  backbone
Parse Sdk Js
The JavaScript SDK for the Parse Platform
Stars: ✭ 1,158 (+1231.03%)
Mutual labels:  parse
Csv
A modern, fast, RFC 4180 compliant parser for JS
Stars: ✭ 38 (-56.32%)
Mutual labels:  parse
Metascraper
Scrape data from websites using Open Graph, HTML metadata & fallbacks.
Stars: ✭ 1,254 (+1341.38%)
Mutual labels:  parse
Parse Ms
Parse milliseconds into an object
Stars: ✭ 74 (-14.94%)
Mutual labels:  parse
Bitnami Docker Parse
Stars: ✭ 56 (-35.63%)
Mutual labels:  parse
Backbone Faux Server
A framework for mocking up server-side persistence / processing for Backbone.js
Stars: ✭ 55 (-36.78%)
Mutual labels:  backbone
Parse Graphql
Parse GraphQL Query.
Stars: ✭ 49 (-43.68%)
Mutual labels:  parse
Marionette.toolkit
A collection of opinionated Backbone.Marionette extensions for large scale application architecture.
Stars: ✭ 71 (-18.39%)
Mutual labels:  backbone
Commandline
CommandLine parser
Stars: ✭ 45 (-48.28%)
Mutual labels:  parse
Pfuser Digits
Authenticate Parse Users using Twitter Digits
Stars: ✭ 76 (-12.64%)
Mutual labels:  parse
Foundatio.parsers
A lucene style query parser that is extensible and allows modifying the query.
Stars: ✭ 39 (-55.17%)
Mutual labels:  parse
Parse Comments
Parse JavaScript code comments. Works with block and line comments, and should work with CSS, LESS, SASS, or any language with the same comment formats.
Stars: ✭ 53 (-39.08%)
Mutual labels:  parse
Python Patch
Library to parse and apply unified diffs
Stars: ✭ 65 (-25.29%)
Mutual labels:  parse
Backbone
This training kit has been developed to learn the basics of Backbone.JS.
Stars: ✭ 84 (-3.45%)
Mutual labels:  backbone
Parse Dashboard For Ios
A beautiful mobile client for managing your Parse apps while you are on the go! Now you can easily view and modify your data in the same way you would on the offical desktop client.
Stars: ✭ 81 (-6.9%)
Mutual labels:  parse

backbone-parse

backbone-parse overrides the Backbone.Sync method to automatically persist your backbone models on Parse using their REST API. Saving you from all the manual plumbing.

Installation

Step 1:

Download backbone-parse.js and include it in your application after backbone.js e.g.

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

Step 2:

Open backbone-parse.js and replace following at the top with your Parse credentials:

var application_id = "CkWCHMSOgyqoNKoIc5hu09uvdZcJ9rpHJD4iwhxI";
var rest_api_key = "H5SIwarTRXqd07C0OIZPbcRTYTNLKsjFAJt5PrFY";
var api_version = "1";

How to use it:

Initialization:

Create a Backbone model and set the parse class name:

var Item = new Backbone.Model({
	_parse_class_name: "Item";
});

Similarly for Collections:

var ItemsCollection = new Backbone.Collection({
	_parse_class_name: "Item";
});

This class name will specify backbone-parse which class persists this model on the Parse server. It is case sensitive. If the class doesn't already exists, Parse will automatically create one.

If the class name is not specified, then the model will be persisted using the default Backbone Sync (i.e. you'll need to specify a url)

Querying

Parse.com provides an API to query your data.

backbone-parse provides an easier method for specifying query constraints*. All you need is to pass the constraints in fetch method of Backbone.Collection. e.g.

var ItemCollection = new Backbone.Collection({
	_parse_class_name: "Item"
});

var items = new ItemCollection();
items.fetch({
	query: {"in_stock":true}
});

This will fetch all the items which are in stock. For details about what constraints you can pass, read: https://parse.com/docs/rest#queries

Feedback welcome.

TODO:

  • tests(!)
  • extend Backbone.Model to tackle Parse User objects

License

Distributed under MIT license.


*inspired by: http://houseofbilz.com/archives/2011/11/07/making-backbone-js-work-with-parse-com/

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].