views:

194

answers:

2

Hi All,

I've got a bit of a problem, I'm about to start a 4-6 month project which will need offline support. AppCache is awesome and accepted as the standard but the big browsers are still undecided about the database implementation with Opera, Safari and Chrome opting for WebSQL (SQLite) and Mozilla and supposedly IE backing IndexDB.

I know that Chrome will also develop an IndexDB option in the future but I could not find any info about any release dates etc.

Now, in 4-6 months, lets call it November I want to have a system that supports most (does not have to be all) latest version browsers (assuming IE9 is out, FF4, and Chrome 6). I don't really want to have a indexdb/websql dual implementation. The thought of using localStorage as a big ugly blob database gives me the shivers and I would love not to use Gears.

What do you, my esteemed colleagues recommend I do, what path should I follow? Which pill to take?

Thanks All

Guido

A: 

i would indeed go for (a.o.) localstorage. I wrote a small proof of concept of such an offline web-app earlier this year (cfr. this blogpost and the offline-enabled webapp here), the basic approach being;

  • put data in arrays/ objects
  • use standard javascript functions to do CRUD (or go for jlinq)
  • json-ify the array/object for storage
  • use a storage-abstraction library like persistjs to store/ retrieve json-ified array/object
futtta
The thought of having to marshal to/from string/JSON every time a database update is required is really ugly. And may be ok for a very small databsae but this will fall over very quickly with a large dataset.I don't like this however, you may be right and this may be the most compatible approach and I'm sure a 'segmentation' approach could be taken to improve performance but sheesh why does FireFox have to make my life so hard!!!!!
gatapia
futtta
+1  A: 

Another option that is relatively well proven is Adobe Air. http://www.adobe.com/products/air/

Example of apps using it here http://balsamiq.com/ and here http://www.tweetdeck.com/

No it's not standards based, but it does offer probably the best out of the box functionality for an application like you describe.

Joshua