1

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?

Jurian Sluiman
  • 13,498
  • 3
  • 67
  • 99

1 Answers1

4

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:

  • What platforms will you support? Dojo Mobile supports most of the major mobile web platforms, but it will still affect your testing.
  • Do you need access to native features of the device and/or wrap your mobile web application in a "native" wrapper? If so, a hybrid toolkit like PhoneGap might be useful: http://phonegap.com/.

Good luck!

Andrew Ferrier
  • 16,664
  • 13
  • 47
  • 76
  • Thanks for your several points. For now, I am interested in iOS and Android development, as it should be a simple tool for an academic research. As it only relies on simple time data and pushing it to a server, no native features are required either. I did not know Dojo does not support html5 offline storage, although I knew I had to use that as storage backend during measurement sessions. – Jurian Sluiman Apr 03 '12 at 20:34
  • It's not so much that Dojo doesn't support it, more that it doesn't need to. HTML5 offline storage is a standard modern browser feature. It's true that Dojo doesn't provide APIs for it explicitly, but there is absolutely nothing to stop you using the two in combination. – Andrew Ferrier Apr 04 '12 at 19:18