cordova - storing backbone model and collections in phonegap singlep page apps before sync -


i developing single page phonegap applications , using backbone, require.js, underscore. need enter patient, , doctor information. means have backbone model patient , doctor. now, may enter 3 patient , 3 doctor information. mean have form collection of pateint , doctor. now, when device offline, want store them locally. , when device online, want sync them server.

i wondering idea here use. should use phonegap sqlite, or backbone adopter local storage or html5 local storage efficient , reliable means? , can suggest me sample on git hub or examples on doing this?

i think on right track. there several step accomplish it, each of represent it's own problem.

  1. detect application goes offline.
  2. once offine, switch backbone.sync ajax-based, localstore (you mentioned sqllite, if there api in javascript , backbone plugin it's nice too).
  3. you track "sync" happens during offline mode.
  4. once application goes online again, not-sync changes uploads server.

please check backbone-offine repo well.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -