Nov 11, 2009

Runningman: Gears, Ajax, and Comet

In the GoogleLab API, there are several awesome examples of apps you can build using Gears. For those of you that don't know what Google Gears is, heres a brief history. Google experimented with offline applications and came to a few conclusions. As they developed offline-enabled applications, they typically found the following design flaws:
  • isolating the data layer
  • deciding which features to implement offline (connection strategy)
  • deciding on the app's modality
  • implementing data synchronization
What an offline application can do is allow a user to interact with a web-service and to be productive while a connection is unavailable. Gears localizes several server features to give the user as rich of an experience as possible. Items that are localized on the client side include a data switch, server data layer, local data later, database, and a sync engine. While that may seem like a lot of stress to put on the client side, they have modules included that lighten the work load and only marginally decrease the speed of the application. When a connection is made with a server, Gears uses either Ajax or Comet to transfer data.

So back to these cool applications. The one I read into was called Runningman. Runningman is a program designed for the Android OS that allows a runner to time their run and through the use of the phones GPS, track their path on a Google Map. The group working on the mountian biking website might benefit from this example, since they are doing something very similar.

The Runningman application includes Gears and contains a full code sample that you can download and manipulate on your own. They even have a full tutorial telling you have to write the program. Way cool! As you walk through the tutorial, they show you how Gears lets you create a desktop shortcut, use Comet to update data, use the Gears Localsever to operate offline, and much more.

5 comments:

  1. Wow, that's neat! I'm still not totally sure how an API can be contacted if you have no connectivity to a network, but it sounds like a nice thing to have! lol I'd never heard of Comet before either so I'm interested in what that is exactly...I see you posted on it though, so I'll go read that to learn what it is. Thanks!

    ReplyDelete
  2. Matt,

    Nice catch on the connectivity. You have to download Gears to your computer (a bit like a Firefox extension) for it to work. Therefor there is no need for an internet connection to enjoy the benefits of Gears. I forgot to mention that and it is a huge part of what makes Gears great!

    ReplyDelete
  3. I just came across an article about Google Chrome for Mac. Within this article, the author emphazises that the Google Gears features became parts or even near specs of HTML 5. It is mentioned that the Google Developer now concentrate moving the key-features of Gears into the kernel of the browser. [Sorry, I only found this german source! http://www.heise.de/newsticker/meldung/Google-Chrome-fuer-Mac-kommt-Gears-geht-874168.html]

    ReplyDelete
  4. I just came across an article about Google Chrome for Mac. Within this article, the author emphazises that the Google Gears features became parts or even near specs of HTML 5. It is mentioned that the Google Developer now concentrate moving the key-features of Gears into the kernel of the browser.
    [http://www.pcworld.com/article/183447/goodbye_google_gears_sniff.html]

    ReplyDelete