42gears_使用Google Gears进行快速客户端搜索

42gears

alt

When Google’s Gears offline web application API turned one year old six weeks ago, Google announced that it had signed its biggest external user to the Gears bandwagon: MySpace. The social network didn’t use Gears to create an completely offline version of the site, but it did use the Google API to add a long sought after missing feature of its messaging application, search.

当Google的Gears脱机网络应用API于六周前成立时,Google宣布已与Gears潮流的最大外部用户MySpace签约。 该社交网络没有使用Gears来创建网站的完全脱机版本,但是它确实使用Google API来添加其消息传递应用程序“搜索”中缺少的功能。

MySpace is using Gears to allow users to store their message archive offline and then search it in real-time. Data can be synced through Gears in the background and search can still feel like its happening on the web, even though searches are being conducted locally. Because everything is happening client side, you can do things like return search results in real-time while a user types — something that is harder to do when requests need to be sent over the web, especially at scale.

MySpace使用Gears允许用户脱机存储其消息存档,然后进行实时搜索。 可以通过Gears在后台同步数据,即使搜索是在本地进行的,搜索仍然感觉像是在网络上进行的。 由于一切都是在客户端发生的,因此您可以在用户输入内容时实时返回搜索结果,例如,当需要通过Web发送请求时,尤其是大规模发送请求时,很难做到这一点。

Gears is able to accomplish this because Full-Text Search abilities are bundled into the SQLite database that comes with the API. Google engineer Brad Neuberg this week released PubTools, an open source collection of JavaScript files that uses Gears and the Dojo Toolkit to do the type of client-side fast search that MySpace does. He also published a long article detailing how create a fast client-side search engine using Gears and embed it in a web site or web app.

Gears之所以能够做到这一点,是因为全文搜索功能捆绑在API随附SQLite数据库中。 Google工程师Brad Neuberg本周发布了PubTools ,这是一个JavaScript文件的开源集合,该文件使用Gears和Dojo Toolkit进行MySpace进行的客户端快速搜索。 他还发表了一篇长篇文章,详细介绍了如何使用Gears创建快速的客户端搜索引擎并将其嵌入到网站或Web应用程序中。

Dion Almaer over at Ajaxian interviewed Neuberg about the project. The video is below.

在阿贾克斯(Ajaxian)的狄翁·阿尔玛(Dion Almaer)就该项目采访了纽伯格 。 视频在下面。

Let us know if you have used Gears at all in any of your projects, and if so, how.

让我们知道您是否在任何项目中都使用过Gears,如果使用过,如何使用。

翻译自: https://www.sitepoint.com/use-google-gears-for-fast-client-side-search/

42gears

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值