google gears 停产,html 5 处于草案中

发布于 2024-08-17 02:26:13 字数 522 浏览 8 评论 0原文

我们正在尝试开发一款移动网络应用程序,该应用程序将提供离线功能,不仅可以阅读,还可以创建内容。

Gears 支持三个重要方面: - 本地服务器,因此我们可以缓存静态内容,例如 html、css、js 等 - 本地数据库,以便我们可以在本地存储数据以供离线访问,并在离线时在其中存储新内容 -workerpool,用于将数据同步回服务器的后台进程

从 gears 页面和其他一些文章的外观来看,gears 正在被 html 5 所取代,这是可以理解的。

然而,现阶段有两个问题:

  1. 要让主流桌面浏览器支持 HTML 5 还有很长的路要走,更不用说移动浏览器了
  2. HTML 5 不支持 Worker,还有一个草案 http://dev.w3.org/html5/workers/ 但我认为真正的浏览器支持还很遥远。

一个人今天做什么? (例如明年之内) 干杯 洛克

we've trying to develop a mobile web app that will provide offline capabilities, not just reading but also creating content.

Gears supports three important aspects:
- local server so we can have cached static content such as html, css, js, etc
- local database so that we can have data stored locally for offline access as well as store new content inside of it while offline
- workerpool, used for a background process that syncs data back to the server

By the looks of the gears page and some other articles, gears is being abandoned in favour of html 5 which is understandable.

However, at this stage there are two problems:

  1. there's still a long way to have HTML 5 supported by major desktop browsers,let alone mobile ones
  2. HTML 5 does not support workers, there is a draft http://dev.w3.org/html5/workers/ but I assume real browser support is still far away.

Do what does one do today? (e.g. within the next year)
Cheers
Rok

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

遇见了你 2024-08-24 02:26:13

我认为您稍微误解了 Google 在 Gears 上的立场。根据《洛杉矶时报》的一篇文章

Google 发言人在后续电子邮件中写道:“我们将继续支持 Gears,这样使用它的网站就不会出现任何问题。但我们希望开发人员能够使用 HTML5 来实现这些功能,因为它是一种基于标准的方法,将在所有浏览器上可用。”

在我看来,在 HTML 5 普及之前和之后继续使用 Gears 是完全安全的。

I think that you have slightly misinterpreted Google's position on Gears. According to an article in the LA Times:

The Google spokesman wrote to clarify in a follow-up e-mail, "We're continuing to support Gears so that nothing breaks for sites that use it. But we expect developers to use HTML5 for these features moving forward as it's a standards-based approach that will be available across all browsers."

It sounds to me like it is completely safe to continue using Gears, until and after HTML 5 is ubiquitous.

独木成林 2024-08-24 02:26:13

HTML5 支持比您想象的要好一些。

Android 对 HTML5 标准提供各种支持,大多数版本中都包含 Google Gears,而 Android 2.0+ 对 HTML5 具有本机支持(至少在音频/视频、画布、离线存储和地理定位方面)。 iPhone 还支持离线存储以及音频/视频标签。 WebOS似乎有离线数据库支持,但除此之外我了解不多。

http://www.whatwg.org/specs/web-workers/current -work/ 是在 Firefox 3.5 和 Safari 4 中实现的 Web Worker 草案,因此它们最终应该出现在 iPhone 版本的 Safari 中。

因此,如果您可以在没有工作线程的情况下生活,并且不介意将自己限制在 Android、WebOS 和 iPhone 上,那么您可以使用 HTML5 的混合方法并回退到 Gears。

我不认为以真正便携的方式支持其他智能手机是可能的,尽管 Firefox for Mobile(即将在诺基亚 N900 上发布)将支持所有 HTML5(如 Firefox 3.6)。

HTML5 support is a little better then you think.

Android has various support for HTML5 standards, with the inclusion of Google Gears into most versions and Android 2.0+ having native support for HTML5 (at least as far as audio/video, canvas, offline storage, and geolocation go). IPhone also supports offline storage along with audio/video tags. WebOS seems to have offline database support, but I don't know much beyond that.

http://www.whatwg.org/specs/web-workers/current-work/ is the web worker draft implemented in Firefox 3.5 and Safari 4, so they should wind up in IPhone's version of Safari eventually.

So if you can live without worker threads and don't mind limiting yourself to Android, WebOS, and IPhone, you can use a hybrid approach of HTML5 with a fallback to Gears.

I don't think supporting other smart-phones is going to be possible in a truly portable way, although Firefox for Mobile (which is nearing release on the Nokia N900) will support all the HTML5 as Firefox 3.6.

缪败 2024-08-24 02:26:13

应用程序缓存、网络存储和Web Worker 在 Firefox 和更新的 Android 设备上工作。

使用这个方便的测试 http://dev.w3.org/2008/mobile-test /v2/ 配置浏览器。

Appcache, Web storage & Web workers works on Firefox and newer Android devices.

Use this handy test http://dev.w3.org/2008/mobile-test/v2/ to profile browsers.

地狱即天堂 2024-08-24 02:26:13

HTML 5不支持workers,有一个草案http://dev.w3.org /html5/workers/ 但我假设
真正的浏览器支持还很遥远。

我使用 Qt 4.6.2 中包含的 WebKit 引擎编写了一个 Web Worker 的工作示例。查看代码历史记录,支持是在 2008 年的某个时候纳入的。

我对(桌面)浏览器(当然 IE 除外)中已经存在的 HTML5 的水平感到惊讶。移动设备落后了几年。我发现这个网站很有用:http://caniuse.com/

HTML 5 does not support workers, there is a draft http://dev.w3.org/html5/workers/ but I assume
real browser support is still far away.

I coded a working example of web workers using the WebKit engine included in Qt 4.6.2. Looking at the code history, support was incorporated sometime in 2008.

I've been surprised by the level of HTML5 already in (desktop) browsers (excepting IE of course). Mobile lags a few years. I've found this site useful: http://caniuse.com/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文