htmlmobiledojooffline-storage

Starting point for Dojo based offline-storage mobile app


I am experienced in webapps, mainly the backend php/mysql (Zend Framework based) stuff, but also some html/css/javascript (aka "jquery" ;) ). Now I want to develop a mobile app, based on Dojo and have no clue which components I need and what is a good starting point.

First, the app: It is quite simple. I need to track times for a certain object with a mobile device (phone). As I have no internet access at that point, this need to be completely offline. I have many web experience, so this must be html(5) and no android/iphone.

What needs to be done is I insert some identification number (manually) and have several buttons I can toggle. Toggle on is starting that procedure, toggle off is stopping. Times (local phone times) are recorded at the appropriate markers. A save button stores everything offline. A button somewhere will be pushed to send all data to a server. If no connection can be made, the data is stored. Otherwise, everything is sent, checked and cleaned up on the phone.

For Dojo I found out I need the AMD loader. Then I can load dojox/mobile for the complete mobile experience. I need dojo/store to store data offline. For pushing everything online there is dojo/_base/xhr. Do I miss something, is what I want too difficult for a starter on Dojo, are there other caveats you can alert me for?


Solution

  • Disclaimer: I am a web and mobile consultant for IBM.

    It sounds to me like first you need to learn something about Dojo Mobile generally. Dojo Mobile is a specific subset of the Dojo toolkit intended for building mobile applications, with specific mobile-optimized UI widgets, etc. This tutorial is as good a place as any to get started:

    http://dojotoolkit.org/documentation/tutorials/1.6/mobile/tweetview/getting_started/

    You might also find the Dojo Mobile showcase useful for understanding some of the features of Dojo Mobile:

    http://demos.dojotoolkit.org/demos/mobileGallery/demo-iphone.html

    It also sounds like offline storage is going to be an important aspect of your application. I think you may have misunderstood the purpose of dojo/store slightly; it's primarily intended for abstractly storing and retrieving data; and whilst that might be important to you, I think the primary thing you'll need to rely on is HTML5 offline storage:

    http://www.html5rocks.com/en/tutorials/offline/storage/

    Some other questions you'll also want to think about:

    Good luck!