Titanium Quickie: A Simple Integration of Alloy and Kinvey, Pt 2 - Clearly Innovative | Web and Mobile DevelopmentClearly Innovative | Web and Mobile Development

More on Alloy and Kinvey Integration

As a follow up to the original posting on Kinvey and Appcelerator integration, I have updated the github repository. I also outlined the differences I had to resolve to get a basic application working.

Including Libraries

We need to include the kinvey library and initialize it. The files can be downloaded here http://devcenter.kinvey.com/titanium/

There is a sample Kinvey Titanium starter app here, but it is not very helpful in that it only really connects you to the service

Creating models/entities pretty much the same

Kinvey Models are called entity, and we associate the name of the collection when creating it. We might also want to bind the Backbone Events when creating the object just to be sure.

Missing models/entities array on the Collections

Kinvey Collections use the field list instead of Models, so we just need to becareful in our code

Below is a simple hack for finding an item in a collection we could extend the object to put the list where models should be so we can use the default functionality of Backbone

Missing models/entities and collections event binding

 

 

This allows us to trigger the fetch and change events on models and collections.

 

See Project in GITHUB, this is still a work in progress, and I am open to comments, feedback on what your thoughts are on the approach. There are some more interesting challanges like complex queries which I will dig into in a later posting.

Click here for project in GitHub  aaronksaunders/todolist.alloy.kinvey · GitHub