9 comments found.

It shouldn’t be too hard really. The only thing I would say is that you’ll want to look at a local cache. So basically you would have:

1. User opens app
2. App checks for an active data connection
3. If data connection exists, sync sqlite with remote server (this can be done with a simple JSON call or just a XHR request)
4. If a connection doesn’t exist, pull tasks from the sqlite database.

Of course the biggest issue will be getting the sync correct. You dont want to go and accidentally overwrite a bunch of entries. For this the best thing I can think of would be to store an md5 hash of the individual tasks, which gets compared against the server version. If they differ, it then looks at a timestamp to see which was the newest and syncs that one across.

I had a flick through the Titanium Q&A and found a few resources that you may be interested in reading: