views:

188

answers:

1

hi all,

we're building an survey webapp which will let the user to add new records to the survey when offline and will upload when the browser reconnects with the server.

We've identified that this will need offline storage and hence google gears seems to be an obvious choice (we understand that adobe Flash has Offline Storage but not sure if that is the best way).

I am aware of Dojo offline javascript toolkit which uses google gears for the underlying functionality. However, dojo offline is not part of the dojo toolkit after version 1.3. (currently dojo is 1.4.2).

Google gears toolkit is currently frozen except for critical vulnerability fixes (it has not been updated almost for the last 1 yr) because they think that HTML 5 is the way to go ahead. Hence, we're looking for a higher abstraction on top of Google Gears engine TODAY, AND which will (in the future) switch the underlying engine to HTML5 if the browser supports HTML5 standards. We'd love to use Dojo but they have discontinued Dojo offline -- we'd prefer something that will be maintained for some time.

Which are possible good strategies, JS toolkits/libraries to use for building this webapp ?

Pls. advise.

+1  A: 

There are a few libraries you can pickup, they all leverage stuff and try to degrade between, flash, html5 and cookies. However none of them really provide a full suite for offline in general. So your stuck with what parts you want offline, database? manifest (images, styles, scripts)?

In a general sense offline storage is the only part that can be used today, the images / styles / scripts is not possible unless you use newer browsers.

The most known one for offline storage is: http://pablotron.org/software/persist-js/

In combo with TaffyDB: http://taffydb.com/

You can make a offline storage solution work in ie6 and up solution. Again manifest stuff like images, script, styles (that are not inline) wont come up with older browsers. To read up about creating a manifest for newer browser to work offline you can read: http://www.w3.org/TR/html5/offline.html

I did make my own, but its not very good: http://www.gorilla3d.com/v8/html5-storage-off-line-cross-browser-support.html

Gorilla3D