An Ember Data Adapter built to use the Parse REST API. This is a full Ember implementation against the Parse REST API without the use of the Parse JavaScript SDK. It is implemented against revision 11 of the Ember Data framework.
- Provides the AJAX connectivity to the Parse REST API.
- CORS implementation
- Provides the translation of objectId to id for identity mapping.
- Provides encoding of hasMany associations to Parse Pointer objects.
- Provides batch serialization according to Parse batch operations.
- Serializes Date types to the ISO 8601 as used by Parse.
- Implements the persistence layer to Parse.
- Provides either bulk/batch persistence or granular (bulkCommit by default).
- Provides created/updated date attributes.
- Provides an easy way to setup a Parse object.
- Includes new StateManager that includes Parse specific states (Password Reset)
- Login
- Signup
- Request password reset
First take a look at the example.html file in the root of this project. It includes a very basic implementation of an application. Read the source to understand how the Ember Data Adapter for Parse is configured. You will want to include your Parse acct information from Parse and then you can run that example.html file in a browser.
Or if you prefer to jump right in, grab the latest version of ember-parse-adapter from the /dist directory in this project and include it in your HTML after the Ember dependencies.
<!-- dependencies -->
<script src="vendor/jquery.min.js"></script>
<script src="vendor/handlebars-1.0.0-rc.3.js"></script>
<script src="vendor/ember-1.0.0-rc.1.js"></script>
<script src="vendor/ember-data.js"></script>
<!-- Parse Data Adapter (latest build) -->
<script src="dist/ember-parse-adapter-0.2.2.js"></script>
Next you'll want to get an account at Parse. After this you will be provided with three keys:
- Application ID
- JavaScript Key
- REST API Key
You will need each of these to configure the ParseAdapter.
var App = Ember.Application.create();
App.Store = DS.Store.extend({
revision: 11,
adapter: ParseAdapter.create({
applicationId: '<YOUR APP ID HERE>',
restApiId: '<YOUR REST API KEY HERE>',
javascriptId: '<YOUR JAVASCRIPT KEY HERE>'
})
});
Once you have your adapter configured now you can create ParseModels just as you would create DS.Models.
App.Post = ParseModel.extend({
title: DS.attr('string'),
body: DS.attr('string')
});
- Demo is not out-of-the-box due to Parse acct dependency.
- findQuery implementation is a bit weak/brittle. Needs full Parse Query.
- Error conditions are handled only by logging the error.
- Parse Roles implementation
- Parse ACL implementation
- Parse Relation for many-to-many associations.
- Implement Store record error states.
- Implement full type encodings in ParseSerializer supported by Parse (Bytes/Pointer/Relation).
- To get a build simply grunt. You'll find builds inside the /dist folder.