Use Google gears to enhance your Web application

Source: Internet
Author: User

This article will briefly explain how to use the API provided by Google Gears to enhance your WEB applications, including increasing offline support, increasing running speed, and local database support.

As we all know, Ajax can improve the responsiveness of Web applications a big chunk, but cloud computing and SaaS (Software as a Service) users still expect to get faster response speed, the Web application can be faster? The answer is yes. With the continuous upgrading of hardware technology, the computing power of client computers is gradually increased, if the WEB application can take full advantage of idle client computing capacity, which will further improve its response speed, but how to make full use of client computing capacity is a new challenge for developers, Google Gears is to help the Web A powerful tool for application developers to address this challenge. Second, users sometimes want to use Web applications offline, which adds to the pain index of Web application developers, and Google Gears just eases the pain of developers in this area. Finally, there is always the concern of enterprise users to adopt cloud computing and SaaS, where the core data is handed over to third-party companies to store and manage, which clearly makes it difficult for companies to protect their company's business secrets, while Google Gear allows users to store user data generated by WEB applications in The user's own computer, rather than storing the data in the cloud or the SaaS provider's data center. This article describes each of the features and APIs provided by Google Gears, and provides examples of using these APIs.

Google Gears Profile

Google Gears is an Open-source project launched by Google, a browser plug-in that adds new functionality to the browser and exposes the corresponding JavaScript APIs to Web applications to enhance the functionality and performance of Web applications. At present, Google Gears support Firefox 1.5+, Internet Explorer 6.0+ and Safari 3.1.1+ and other mainstream browsers.

First, the LocalServer API provided by Google Gears can cache the HTTP resources of the Web application to the user's hard disk, which can further improve the responsiveness of the Web application on an Ajax basis, while also enabling the user without network connectivity Web applications can still be used; second, Google Gears provides a workerpool API to help Web applications run time-consuming operations in the background to improve the responsiveness of the UI, which can also be used by Web applications to work on a portion of the original server-borne computing To the client to deal with; third, the database API provided by Google Gears allows WEB applications to save data to the user's hard disk and comply with the same source security policy, thus protecting the user's sensitive data from being exposed. In addition, Google Gears also provides Desktop, geolocation and other APIs to enrich the existing functionality. Web apps such as Google Docs, Google Reader and Zoho are currently using Google Gears to provide more functionality. Here's how to leverage the various APIs provided by Google Gears to enhance your Web applications.

Environmental preparedness

In order to develop the Google Gears application, you need to first install the Google Gears plugin to your browser, use your browser to access http://gears.google.com/, if your browser does not have the Google Gears plugin installed, in the displayed page A Install Gears button appears in the upper-right corner, and clicking it will begin to install Google Gears. Next you need to go to http://code.google.com/intl/zh-CN/apis/gears/tools.html to download the Gears_init.js file and put it in your WEB application. Because the API provided by Google Gears is based on JavaScript language, you don't need to install additional IDE plug-ins to develop Google Gears programs, just plain text editors are required. If your browser is Firefox, you can install Firebug to debug JavaScript.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.