开发者

HTML5 Offline storage web framework

开发者 https://www.devze.com 2023-02-05 11:16 出处:网络
I am looking for a web app framework which can automatically generate an HTML5 offline storage based app, so while the users become disconnected they still can view the data which normally is stored o

I am looking for a web app framework which can automatically generate an HTML5 offline storage based app, so while the users become disconnected they still can view the data which normally is stored on a server

Also currently I am using Django and it would be great if there was a framework which could pull data from Django and present that as an offline app.

From the related questions suggested by sta开发者_StackOverflow中文版ckoverflow, while writing this question, I found one interesting link mentioning that GWT has such functionality, I would like to know more about that if possible and if it can generate an HTML5 offline app

Thanks in Advance


Rather than server-side frameworks, you should be taking a look at JavaScript frameworks.

Dojo Storage will transparently select between providers such as Google Gears, Adobe AIR or plain old HTML 5 local storage. Dojo 1.5 - dojox.storage: http://dojotoolkit.org/api/1.5/dojox/storage

There's also jQuery local storage: http://plugins.jquery.com/project/saveit

... or jStorage, which can act as a storage plugin for jQuery, Prototype or MooTools: http://www.jstorage.info/

With any of these, you should be able to use a quick little AJAX call to pull (JSON perhaps) data from your server and use one of these tools to help minimise your storage code.


You're talking about a standalone app, not a django app.
This can be done with javascript (jQuery, Sproutcore, JavascriptMVC, Pyjamas ...) or Adobe AIR, or...
Pulling data from Django is just a matter of setting up a syncing method, most probably using JSON, to fill up the browser local storage. So this is not django-specific at all.

If you want a standalone django app, this can be done if you bundle in a python desktop app django with a built-in server, that's another question


You could suggest the users to create web apps or use google gears instead... I don't know if this will fill the question, but, i'm in the same way. However, I'm developing an governamental solution who will run only for some kind of people, so, I can have a few control about the user's environment... All you need to do is to use jquery to detect if user has a live connection, or offer to the users a 'preferences' page where you define the behavior of the page itself... Some info about offline cache: http://diveintohtml5.ep.io/offline.html

PS.: In another post in stackoverflow, I 've found another question: html5 offline caching with php driven sites... The last Post said:

HTML5 offline caching does not work to make your pages interact; it works only to make a particular page available offline. Basically, it works on a URL-by-URL basis. If you absolutely need offline functionality, you will be forced to make it work in JS.

Also, make sure your manifest includes all resources used by all pages.

Hope this helps!

Hope it helps!!

0

精彩评论

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