找回密码
 FreeOZ用户注册
查看: 3167|回复: 13
打印 上一主题 下一主题

[网络技术] 下一代WEB:对基于浏览器存储的支持

[复制链接]
跳转到指定楼层
1#
发表于 4-6-2008 16:10:04 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?FreeOZ用户注册

x
详见:  The Next-Gen Web: Browser Storage Support
Overview of Current And Future Support


Gears
BrowserPlus
Firefox
IE8
Webkit
ApplicationCache
soon


                               
登录/注册后可看大图

                               
登录/注册后可看大图


                               
登录/注册后可看大图


                               
登录/注册后可看大图
detect onLine

                               
登录/注册后可看大图


                               
登录/注册后可看大图


                               
登录/注册后可看大图

                               
登录/注册后可看大图


                               
登录/注册后可看大图

LocalServer


                               
登录/注册后可看大图

                               
登录/注册后可看大图


                               
登录/注册后可看大图


                               
登录/注册后可看大图

                               
登录/注册后可看大图
Storage

                               
登录/注册后可看大图

                               
登录/注册后可看大图


                               
登录/注册后可看大图


                               
登录/注册后可看大图

                               
登录/注册后可看大图
Database

                               
登录/注册后可看大图

                               
登录/注册后可看大图


                               
登录/注册后可看大图

                               
登录/注册后可看大图

                               
登录/注册后可看大图
Threading

                               
登录/注册后可看大图

                               
登录/注册后可看大图


                               
登录/注册后可看大图


                               
登录/注册后可看大图

                               
登录/注册后可看大图
SQL

                               
登录/注册后可看大图

                               
登录/注册后可看大图

                               
登录/注册后可看大图

                               
登录/注册后可看大图


                               
登录/注册后可看大图
回复  

使用道具 举报

2#
发表于 4-6-2008 21:48:24 | 只看该作者
看不到,给ZT一下
回复  

使用道具 举报

3#
 楼主| 发表于 4-6-2008 21:53:27 | 只看该作者
The next-gen web is starting to gather pace, as this week MySpace integrated Google Gears, Yahoo! announced their new BrowserPlus product and Google launched a browser-based edition of their 3D Earth product. Technologies and formats such as AIR, Silverlight, JavaFX, Gears, XUL, Web Applications 1.0(DOM5, HTML5 etc.) allow developers to accelerate beyond AJAX andtowards a new generation of web applications with better performance,more functionality and tighter desktop integration.

Developersand users are now presented with more web technology choice then everbefore; “DLL hell” has been superseded by “plug-in hell”, as a varietyof companies present their versions of what the next-gen web will looklike. But on the web, such choice can come at a cost to both users anddevelopers. More than a decade has passed since the first battle overweb formats, back then it was Microsoft, Netscape, Apple, AOL andothers laying different foundations in the form of browsers, scriptinglanguages, web servers and more. The legacy of that battle is stillbeing felt today, as Javascript developers rely on whole libraries to assist them in developing cross-browser code and CSS developers depend on a catalog of hacks so that their sites can look consistent across different browsers.Withthe new rich web application technologies still in the developmentphase, there is an opportunity to not repeat the mistakes of the pastand instead take a standards-based approach. Thankfully during thecourse of the previous decade companies such as Microsoft became morereceptive to open standards, data portability and cross-platformsupport. Having broad support for open standards simplifies technologyfor both users and developers, but it is obvious that not all of thecurrently announced technologies, such as those listed above, will

Browser-based Local Storage

Asweb applications became more popular there was a general demand for anability to run web-based applications offline. The first such solutionsthat could work without requiring a browser plugin or separateapplication were those that relied on the caching headers within HTTPto store objects within the browsers cache. Javascript libraries suchas Dojo implemented support for offline web applicationsusing the same principals, but applications were very limited in scopeas there was no easy way to store structured data on the browser (Dojonow also abstracts a variety of other storage engines including Gears - tip: Dylan) .

In May of 2007, Google launched Google Gears,a browser plugin that allows web applications to synchronize data intoa local data store and then allow web applications to function offline.At the launch of Gears, Google Reader was adapted to support it, andthe emphasis of the pitch for Gears was about offline applicationaccess. What was less known is that Gears is a lot more than justoffline access, as it provides three primary functions:
  • Caching of resources (HTML pages, images etc.)
  • Structured data storage in a database
  • Asynchronous background worker threads
Thepart of this we will focus on here is the local object and structureddata storage. Gears provides these functions via a Javascript API,which can be accessed by any web application. The structured storage isprovided by Sqlite,a popular lightweight RDBMS. With the local database, the developer cannot only perform queries and inserts to record new data, but also morecomplex SQL like joining between tables etc. Although you can havemultiple applications using Gears, each app runs in a sanboxedenvironment with a domain-based security model (similar to cookies andAjax requests). Sqlite has been built into Firefox since version 2.0,but its API is only accessible from an add-on or a core Firefoxcomponent. The Gears plugin bridges that gap and makes it availablewithin the client scripting environment.

Before Gears was launched, the Web Hypertext Application Technology Workgroup(WHATWG) had begun work on its Web Applications 1.0 draft spec, whichincluded structured data storage as part of HTML5. The current draftspec from the working group includes definitions for a Database objectfor accessing and querying a local data store. The details of theimplementation are left up to the vendor, but the API is detailed inthe spec. Firefox will be implementing parts of the same storage APIfrom the WHATW spec in version 3.0 of the browser, which is currently available as a preview release. The key components of the WHATWG spec are:Implementinglocal storage, caching and offline access are relatively easy. Theapplication can first check to see if these functions are supported,and then setup the local cache by synchronizing the users data inbackground processes. While a thread is running, either uploading ordownloading, you can query it to check on its status to provide theuser with feedback (eg. a progress bar). Once the data is local, byrunning database queries on the local machine developers are able to drasticallyimprove performance. Currently many web applications use the browser asonly a presentation layer, for eg. a spreadsheet application may do around-trip back to the server to work out even elementary calculationssuch as =1+1. By utilizing the local data store andclient-side code, the developer is able to offload processing andstorage to the client and provide a much smoother, desktop-likeexperience at the same time.

Current And Future Support

Theissue is that the majority of the WHATW specification was written afterGears was released, so the Database and LocalServer objects used inGears are not compatible with WHATW - for now. The good news is thatGoogle have come out and fully backed the storage portionsof the WHATWG HTML5 spec, so developers with apps running on Firefox 3with Gears installed will have a choice to use either the nativeimplementation, or the Google implementation. Google go on to say thatthey will likely offer extra features as an incentive for developers tocontinue to target Gears over-and-above the HTML5 implementation(features such as desktop shortcuts, etc.).

Other alternativesfor local data storage, such as Flash local storage, are completelyincompatible with the WHATW specification. The developers at WebKit were very quick to announcethat they have started implementing the storage portions of the HTML5spec also. It is currently available in nightly builds, so in the nearfuture we will see support in both Konquror and Safari. Opera have alsoannounced similar plans and they are actually leading everybody when itcomes to implementing HTML5 and Web Forms. Yahoo! BrowserPlus was onlyannounced yesterday, and it is currently unclear wether their localstorage support is compatible with the specification as laid out by theworking group.

Local storage is a major new feature of the newweb API, and developers will not only have consistent support acrossbrowsers but will also have the option of Google Gears (which isalready available) as well as Yahoo! BrowserPlus (depending on how itworks). There is just one browser maker missing in this discussion sofar and that is Microsoft. Microsoft have released an early preview ofIE8 and announced a raft of new features, a lot of which are based onopen standards such as better CSS and Javascript support (with a morestandardized object model). The big question is wether we will seeconsistent local storage support from IE8 following the same spec asthe other browser vendors. The IE team have announced that IE8 will support DOM Storage, but that is only part of the overall local storage spec (ie the Storage object described above only).

[ 本帖最后由 coredump 于 4-6-2008 20:54 编辑 ]
回复  

使用道具 举报

4#
发表于 5-6-2008 00:23:25 | 只看该作者
3x
回复  

使用道具 举报

5#
发表于 6-6-2008 20:53:28 | 只看该作者
IE6, 用HTA格式就可以读写本地硬盘
回复  

使用道具 举报

6#
 楼主| 发表于 6-6-2008 21:22:17 | 只看该作者

回复 #5 goldensun 的帖子

这里只的Browser based storage不仅仅是读写本地硬盘,一般要具有local server能力,数据库能力,full text search能力等。
回复  

使用道具 举报

7#
发表于 6-6-2008 21:53:38 | 只看该作者

回复 #3 coredump 的帖子

楼上的转载人家的链接和内容得到授权了吗
回复  

使用道具 举报

8#
发表于 6-6-2008 22:01:58 | 只看该作者
浏览器已经成了虚拟机,而且是亟待优化的虚拟机。
回复  

使用道具 举报

9#
 楼主| 发表于 6-6-2008 23:37:40 | 只看该作者
原帖由 bash 于 6-6-2008 20:53 发表
楼上的转载人家的链接和内容得到授权了吗

我转载来自网络的文章时一般都会看看有没有相关的权利声明, 或者是否有创作公用之类的内容许可,有则遵循之;没有则转贴但著名为转贴并提供原始文章连接. 作者有异议时则删除.
回复  

使用道具 举报

10#
发表于 7-6-2008 04:17:33 | 只看该作者

回复 #9 coredump 的帖子

回复  

使用道具 举报

11#
发表于 7-6-2008 04:18:08 | 只看该作者

回复 #1 coredump 的帖子

感觉和Web时代有点脱节了,没太看懂
回复  

使用道具 举报

12#
 楼主| 发表于 7-6-2008 14:09:21 | 只看该作者

回复 #11 ubuntuhk 的帖子

实际就是Google Gears, Adobe AIR这类的技术,给浏览器增加离线工作的能力,使WEB程序更像本地的桌面程序。参见我那个Google Gears API的分析,我觉得好好利用这些技术,可以开发出很有趣的东西。

http://www.freeoz.org/forum/thread-787058-1-1.html
回复  

使用道具 举报

13#
发表于 9-6-2008 00:46:49 | 只看该作者
我们公司开发的销售系统,就是用的离线web方式
用户的应用程序用IE作界面,数据则用xml 文件
全部用html / xslt / javascript 写成,每天上传或下载数据到中心数据库
回复  

使用道具 举报

14#
发表于 22-7-2008 20:05:26 | 只看该作者
有些东西已经不知道了 看来是有些落后了
回复  

使用道具 举报

您需要登录后才可以回帖 登录 | FreeOZ用户注册

本版积分规则

小黑屋|手机版|Archiver|FreeOZ论坛

GMT+11, 17-11-2024 07:25 , Processed in 0.027476 second(s), 29 queries , Gzip On, Redis On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表