Titanium Appcelerator Quickie: Kinvey Todo & Client, Part One - Clearly Innovative | Web and Mobile DevelopmentClearly Innovative | Web and Mobile Development


When in Boston a few weeks ago, I had the opportunity to meet the guys over at Kinvey. I had been hearing about the service and features a for a while. Had not paid much attention since I have been working with Appcelerator Cloud Services, but I figured options and multiple tools for my company and for the community only makes it better for everyone.

For those who don’t know, this is what Kinvey does…

Kinvey (pronounced Kin-vey, like convey) makes it ridiculously easy for developers to setup, use and operate a cloud backend for their mobile apps. They don’t have to worry about connecting to various cloud services, setting up servers for their backend, or maintaining and scaling them.

And if you are like me and need a picture…

After taking a look at the documentation and the per user “Success Pricing”; I figure lets see what the javascript library looked like. There were two major changes I had to make to get it to work.

  1. Add the Titanium http client code
  2. Replace the use of HTML5 LocalStorage with Appcelerator Properties

After those changes, things just worked.

So before you hop into the Appcelerator code, you need to head over to the Kinvey site and create your account and setup your application.

After you signup, you need to create an application

Then you will need the app keys for your Titanium Application

I am not going to repeat the basics that are needed for getting started with Kinvey API since their documentation covers it pretty well; I will just jump into the Appcelerator code.

Appcelerator Todo App + Kinvey

Step One – Initialize (Download Modified Kinvey.js API)

you will need to include the specific application information when initializing the application of utilizing Kinvey.

Step Two – Create Object

Step Three – Create Collection

We added some extra code here, the queryType that is provided to the collection allows us to apply a query to the collection when initializing it

Step Four – Saving a Todo Object

Here we create the todo object as a simple javascript object, and then we call save on the newly created object to persist the information to the backend

Helpful Links


Part Two of this blog post will integrate blob uploads using the Kinvey API, follow me on twitter, @aaronksaunders for updates


Few other Clearly Innovative Inc. blog posts on integrating Appcelerator w/other technologies