开发者

Offline db app to online syncing, cross-platform, use HTML5?

For a school project for a real-world client we are being asked to create an a开发者_如何转开发pp that can work in offline mode to store information into some sort of db, that will then sync that info with an online db when the system has an internet connection (needs to support pc, mac, ios, android, but could possibly be a different app for each system type)

Is HTML5 with Web Storage (local) the best way to go? All the browsers seem to support it so it seems like the best option for online use, but can it even be used to run in an offline mode with no access to the internet? I'm a little lost here.


If you have to store content when offline, then the local storage facility of HTML5 is pretty much your easiest shot; you could probably do something with Java or (spit) ActiveX that would let you access to local file system, but why re-invent the wheel ?

Better yet, there already exists libraries that let you sync the 'local' storage to the DB on your website, which should suffice for your offline requirement:

Best way to synchronize local HTML5 DB (WebSQL Storage, SQLite) with a server (2 way sync)

To clarify that, you can code to use local storage and then synchronise that locally stored data to the main database when you're connected.

Considering the many platforms you're going to be targeting, HTML5 may well be the only solution.


Yes, you are on the right track. Web Storage uses a db on the client side to store information, hence you do not need an internet connection. You can read up more on it here


There are 3 core capabilities to consider.

  • Browser catching
  • Local Storage
  • Local Database

You will find more in depth explanation in the link below:
http://www.sitepoint.com/offline-capabilities-native-mobile-apps-vs-mobile-web-apps/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜