ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel
  • »
  • Technology»
  • Computers & Software»
  • Computer Software

Work Offline With Google Gears

Updated on October 22, 2011

There are two distinct genres of applications that we use: online and offline. Historically, software packages were supposed to run off the hard-disk after running an installation or setup programme. Then came the web and offered sites like Hotmail allowing users to substitute mail programmes with an online alternative.

Since then, the race to port traditionally desktop managed applications to online browser-based versions has taken unprecedented pace. Now everything from e-mails, spreadsheets, word processors, presentations and even corporate tools like CRMs, ERPs, help desks, project management tools, all are available as online applications. But there is one limitations in these applications: they can only be used till home user is connected with the internet.

This limitation has obstructed wide-spread use of online office suites against the MS Office, since users in our country can neither afford to have an always on connectivity, nor the infrastructure allows it. So, to bridge this gap between online and offline functionality, Google has come up with a new technology called Google Gears that web enthusiasts term as truly revolutionary and groundbreaking.

Google Gears, allows existing web-based applications to support offline mode. One of the exciting examples of this technology is Google Reader, an online RSS news feed reader which can now download the feeds for offline viewing right in the browser interface - without having to download or install any specific programme.

Not only Google's own applications, but third-party solution providers such as, Zoho's web based word processor called Zoho Wirter offers the work offline facility. What this means is that, even though a user is using a browser-based application while connected to the internet, the programme will not cease to function when the connectivity is no longer there. Imagine having access to Gmail while offline, so that e-mails can be composed and sent when going online again.

Though a far fetched thought at this point in time, but it could very well be the ultimate goal of technologies like Google Gears. Because this is the only way for web application developers to pose a threat to the long standing dominance of desktop software giants such as Microsoft.

Google Gears claims three distinct functions: Store and serve application resources locally, store data locally in a fully-searchable relational database and use of javascript to improve application responsiveness to make them look much more like high performance desktop application.

To get started with Google Gears, download it as a browser plug-in for either Internet Explorer or Firefox. As it supports all the major OS like Windows, Mac and Linux, trying it out should not be a problem.

Once installed, applications designed to take advantage of offline functionality automatically start to work seamlessly - except for two most common visual notifications. First is a link saying Go Offline - for example, Google Reader and Zoho Writer. Say you are using Zoho Writer in browser window, pressing Go Offline results in second indication - a dialogue box asking for permission to use Google Gears. This is extremely important from security point of view since giving an application authority to store data locally can cause havoc if in hands of malicious developers. So be sure whenever you press Allow. To control allowed and denied sites in Firefox, go to Tools > Google Gears Settings.

Back to the discussion. Once in offline mode, and the internet is disconnected, you may continue to work on your document, and use a variety of formatting and other options. Pressing Go Online after connectivity is restored results in data synchronisation. Note that in applications such as Google Reader, going online again would mean updating new feeds from the server to the client display, but there is nothing much to send back to server in terms of user generated data. Reader can at most mark starts or change status from unread to read.

As an end-user, all we can do is to wait and see when online application companies make their products Google Gears enabled. But as a developer, you can start migrating your own website to take advantage of Gears. There is a full-fledged Developer's Guide available over Gear's official site along with Getting Started, that is

  • TutorialArchitecture
  • Security plus Resources and Tools.

The API reference is a rich source to see hands-on code examples for factory, database, Local Server and Worker Pool management in Google Gears. Note that Google Gear is not a language in itself - it is an extension of existing web architecture that would now support offline mode, and for that it uses JavaScript. While adding offline connectivity support to your existing web application, keeping in mind the following factors:

1. Data Layer and Synchronisation

Normally, a web-browser would talk directly to the web-server to fetch and update information shown to the user. Introduction of a data store between client (that is, browser) and server would mean that the client would make all its queries and requests to this data store instead of server which in turn would interact with the server. Or additionally, a data switch can be introduced between the client and data store and it is left up to this switch to decide when to fetch the data from the server, or when to refresh the server as new information is available (for example, user updates a document and auto-save has to be performed while online or offline).

This is how AJAX works, as data synchronisation with the server is no more necessary on every form submit or button press event as in the traditional web. And that is the power of Google Gears using which Remember The Milk, an online task management application, incorporated offline support in its service. Also, its important to decide ‘modality' that is, if there is going to be a user clicked go-offline function or the app would automatically detect disconnection an go-offline transparently, or a combination of both.

2. User of LocalServer, Database and WorkerPool

Depending upon the nature of application or website, the above three components of Google Gear can be used to create a rich user experience. LocalServer allows content to be kept at client side to speed things up, say by downloading and storing style-sheet CSS files. These are version controlled and updates are automatically updated. For data intensive sites, Gears data store in SQLite 3 format so that applications such as task managers and bookmarking sites can easily store, organise and retrieve customer data. Finally, WorkerPool can be used to introduce threading like capability to an application.

3. Offline Features

A lot depends upon nature of an application itself before deciding which features are to made available in offline mode. For example, downloading a customer's online bookmarks for local editing in bulk makes sense as compared to presenting the data in browser and requiring the user to press Submit every now and then. Similarly, processing-intensive search functionalities can be pushed at client side. That is why there should be a thorough analysis of all these architectural considerations for designing a new offline-supported app or adding this functionality in an already developed application.

The line separating online and offline state continues to get blurred and Google Gears is a giant step in this direction.

Comments

    0 of 8192 characters used
    Post Comment

    • chinemeremz profile image

      chinemeremz 7 years ago

      The big G keeps improving lives every day with their never ending wonderful apps. Thanks for this well thought out and written hub, really enjoyed it. Got it bookmarked already.

    • Neil Ashworth profile image

      George Poe 8 years ago from United Kingdom

      Cool hub!!!

    • Neil Ashworth profile image

      George Poe 8 years ago from United Kingdom

      Beautiful !!! Love it..

    working

    This website uses cookies

    As a user in the EEA, your approval is needed on a few things. To provide a better website experience, hubpages.com uses cookies (and other similar technologies) and may collect, process, and share personal data. Please choose which areas of our service you consent to our doing so.

    For more information on managing or withdrawing consents and how we handle data, visit our Privacy Policy at: "https://hubpages.com/privacy-policy#gdpr"

    Show Details
    Necessary
    HubPages Device IDThis is used to identify particular browsers or devices when the access the service, and is used for security reasons.
    LoginThis is necessary to sign in to the HubPages Service.
    Google RecaptchaThis is used to prevent bots and spam. (Privacy Policy)
    AkismetThis is used to detect comment spam. (Privacy Policy)
    HubPages Google AnalyticsThis is used to provide data on traffic to our website, all personally identifyable data is anonymized. (Privacy Policy)
    HubPages Traffic PixelThis is used to collect data on traffic to articles and other pages on our site. Unless you are signed in to a HubPages account, all personally identifiable information is anonymized.
    Amazon Web ServicesThis is a cloud services platform that we used to host our service. (Privacy Policy)
    CloudflareThis is a cloud CDN service that we use to efficiently deliver files required for our service to operate such as javascript, cascading style sheets, images, and videos. (Privacy Policy)
    Google Hosted LibrariesJavascript software libraries such as jQuery are loaded at endpoints on the googleapis.com or gstatic.com domains, for performance and efficiency reasons. (Privacy Policy)
    Features
    Google Custom SearchThis is feature allows you to search the site. (Privacy Policy)
    Google MapsSome articles have Google Maps embedded in them. (Privacy Policy)
    Google ChartsThis is used to display charts and graphs on articles and the author center. (Privacy Policy)
    Google AdSense Host APIThis service allows you to sign up for or associate a Google AdSense account with HubPages, so that you can earn money from ads on your articles. No data is shared unless you engage with this feature. (Privacy Policy)
    Google YouTubeSome articles have YouTube videos embedded in them. (Privacy Policy)
    VimeoSome articles have Vimeo videos embedded in them. (Privacy Policy)
    PaypalThis is used for a registered author who enrolls in the HubPages Earnings program and requests to be paid via PayPal. No data is shared with Paypal unless you engage with this feature. (Privacy Policy)
    Facebook LoginYou can use this to streamline signing up for, or signing in to your Hubpages account. No data is shared with Facebook unless you engage with this feature. (Privacy Policy)
    MavenThis supports the Maven widget and search functionality. (Privacy Policy)
    Marketing
    Google AdSenseThis is an ad network. (Privacy Policy)
    Google DoubleClickGoogle provides ad serving technology and runs an ad network. (Privacy Policy)
    Index ExchangeThis is an ad network. (Privacy Policy)
    SovrnThis is an ad network. (Privacy Policy)
    Facebook AdsThis is an ad network. (Privacy Policy)
    Amazon Unified Ad MarketplaceThis is an ad network. (Privacy Policy)
    AppNexusThis is an ad network. (Privacy Policy)
    OpenxThis is an ad network. (Privacy Policy)
    Rubicon ProjectThis is an ad network. (Privacy Policy)
    TripleLiftThis is an ad network. (Privacy Policy)
    Say MediaWe partner with Say Media to deliver ad campaigns on our sites. (Privacy Policy)
    Remarketing PixelsWe may use remarketing pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to advertise the HubPages Service to people that have visited our sites.
    Conversion Tracking PixelsWe may use conversion tracking pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to identify when an advertisement has successfully resulted in the desired action, such as signing up for the HubPages Service or publishing an article on the HubPages Service.
    Statistics
    Author Google AnalyticsThis is used to provide traffic data and reports to the authors of articles on the HubPages Service. (Privacy Policy)
    ComscoreComScore is a media measurement and analytics company providing marketing data and analytics to enterprises, media and advertising agencies, and publishers. Non-consent will result in ComScore only processing obfuscated personal data. (Privacy Policy)
    Amazon Tracking PixelSome articles display amazon products as part of the Amazon Affiliate program, this pixel provides traffic statistics for those products (Privacy Policy)