HTML5数据库的现状如何?
该规范 http://www.w3.org/TR/webdatabase/ 说:
该文档位于 W3C 推荐轨道上,但规范工作已停止。该规范陷入了僵局:所有感兴趣的实现者都使用相同的 SQL 后端 (Sqlite),但我们需要多个独立的实现来沿着标准化路径前进。
这是否意味着 HTML5 数据库即将消失,并且在一段时间内我们将拥有使用 SQLite 的事实上的标准,可能会存在浏览器差异?或者 W3C 是否发布了完成该标准的计划?
This spec http://www.w3.org/TR/webdatabase/ says:
This document was on the W3C Recommendation track but specification work has stopped. The specification reached an impasse: all interested implementors have used the same SQL backend (Sqlite), but we need multiple independent implementations to proceed along a standardisation path.
Does this mean that HTML5 database is going away, and for some time we will have a de-facto standard using SQLite, possibly with browser differences? Or has the W3C published a plan of attack for finishing the standard?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
根据这篇文章:
我个人并没有被本文中提出的论点所左右,但很明显(目前)Mozilla 已经决定 Web SQL 数据库已死。
关于本文的更多有趣评论可以在黑客新闻上找到。
According to this article:
I'm not personally swayed by the arguments put forth in the article, but it seems clear that (for the time being) Mozilla has decided that Web SQL Database is dead.
Further interesting comments about this article may be found on Hacker News.
我的理解是,这现在称为“IndexedDB”
http://www.w3.org/TR/IndexedDB/
显然 Firefox 团队已经开始了实现这个:
http://hacks.mozilla.org/2011/01/indexeddb-在-firefox-4/
My understanding is that this is now called "IndexedDB"
http://www.w3.org/TR/IndexedDB/
Apparently the Firefox team has started implementing this:
http://hacks.mozilla.org/2011/01/indexeddb-in-firefox-4/
不知道有没有人知道答案。 Mozilla 不喜欢对 SQLite 的依赖,并决定走不同的路。然而,所有基于 WebKit 的浏览器都已经实现了它,而且我没有看到他们删除它,因为任何利用该规范而构建的网站都会被破坏。
这意味着至少在某些情况下,主要是在大多数浏览器都有 webkit 实现的移动领域,使用 HTML5 Web SQL 规范仍然有意义。我认为对于希望使用诸如phonegap 之类的框架创建移动应用程序的开发人员来说尤其如此。
有时,作为应用程序开发人员,您希望为用户提供对数据的访问权限,即使他们没有连接到互联网,或者连接速度很慢,并且某些类型的数据存储在数据库中比存储在数据库中更有效。 cookie 或 JSON cashe。例如,如果您的数据具有关系,那么执行联接查询来提取所需的数据比搜索 json 映射要容易得多、快捷得多。
我不认为该规范已经消亡,而且我实际上希望 Mozilla 能够改变他们的立场,以便开发人员可以使用它来解决移动 webkit 世界之外的问题。
I don't know if anyone knows the answer. Mozilla doesn't like the dependence upon SQLite and has decided to go a different way. However, all WebKit based browsers already have it implemented and I don't see them removing it as any websites built to take advantage of the spec would be broken.
This means that at least in certain contexts, mostly within the mobile sphere where most browsers have a webkit implementation, it can still makes sense to use the HTML5 Web SQL spec. I see this as especially true for developers who are looking to create mobile applications using a framework like phonegap.
There are some times where as an application developer you want to provide users with access to data even if they aren't connected to the internet or if the connection is slow and some types of data is just more efficiently stored in a database than in a cookie or JSON cashe. For example, if you have data that has relationships it is much easier and quicker to do a join query to pull the data you need than it is to search a json map.
I don't think the spec is dead, and I actually hope that Mozilla will reverse their stance so that developers can use it to solve problems outside of the mobile webkit world.