用于离线 web 应用程序的 javascript 工具包
我们正在构建一个调查网络应用程序,它允许用户在离线时向调查添加新记录,并在浏览器与服务器重新连接时上传。
我们已经确定这需要离线存储,因此 google gears 似乎是一个明显的选择(我们知道 adobe Flash 具有离线存储,但不确定这是否是最好的方法)。
我知道 Dojo离线 javascript工具包使用google gears作为底层功能。不过,1.3版本之后,dojo离线不再是dojo工具包的一部分。 (目前dojo是1.4.2)。
Google gears 工具包目前处于冻结状态,除了关键漏洞修复(几乎在过去 1 年里没有更新过),因为他们认为 HTML 5 才是前进的方向。因此,我们现在正在寻找基于 Google Gears 引擎的更高抽象,并且如果浏览器支持 HTML5 标准,它将(将来)将底层引擎切换到 HTML5。我们很想使用 Dojo,但他们已经停止了 Dojo 的离线服务——我们更希望能保留一段时间。
用于构建此 Web 应用程序的可能好的策略、JS 工具包/库有哪些?
请。建议。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以选择一些库,它们都利用一些东西并尝试在 flash、html5 和 cookie 之间进行降级。然而,他们中没有一个真正提供完整的离线套件。那么您对哪些部分想要离线(数据库)感到困惑?清单(图像、样式、脚本)?
一般来说,离线存储是当今唯一可以使用的部分,除非您使用较新的浏览器,否则图像/样式/脚本是不可能的。
最著名的离线存储是:
http://pablotron.org/software/persist-js/
与 TaffyDB 结合使用:
http://taffydb.com/
您可以使离线存储解决方案在 ie6 及更高版本的解决方案中工作。同样,旧版浏览器不会出现图像、脚本、样式(非内联)等明显内容。要了解如何为较新的浏览器创建离线工作清单,您可以阅读: http:// /www.w3.org/TR/html5/offline.html
我确实做了自己的,但它不是很好:
http://www.gorilla3d.com/ v8/html5-storage-off-line-cross-browser-support.html
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