Mobile application development has many challenges. The announcement of Google Gears on Mobile Devices will help solve the problems of network connectivity, network latency, and limited bandwidth. On the desktop, a lot of the focus on Gears was its ability to allow applications to function when your computer was not connected to the network. In addition to building mobile web apps here at SitePen, we released Dojo Offline, which integrates the Dojo Toolkit with Gears to make building disconnected web applications even easier. As we all know, mobile devices lose connectivity with the network on a regular basis. Gears’ ability to keep the data that users need stored on the phone will be key to keeping mobile applications running even when networks fail to keep phones connected.

Gears will have an even larger impact in the area of network latency and bandwidth. Even the fastest 3G networks have limited bandwidth and even worse latency. The simple act of making HTTP requests takes a significant amount of time compared to broadband connected computers.

Gears allows developers to build applications that download data before it is needed and store it for extended periods of time. Once the initial download is complete only changes to the data need to be transmitted, meaning that users can do the initial download on a fast network and then only have to download small amounts when on a slow network. Issues of latency will be greatly reduced because most data access could be done locally.

iphone-speed.png

The example to the right shows a dojo.xhrGet() call that retrieves a text file containing 14 bytes. Even EDGE’s minimal throughput of 100kbps should not have a problem sending that amount of data. To Apple’s credit, the iPhone’s average Wi-Fi performance is only slightly worse than the Mac Pro (the reference desktop computer). However, on average the iPhone’s EDGE performance was five times slower than when it is connected via Wi-Fi. With XHR requests taking over a second on average to complete, loading data via lots of small requests will take a long time. A Gears-enabled application would be able to load a significant amount of data when the device is connected to a Wi-Fi network, and then only transfer data changes when the device is on the EDGE network.

Gears will also allow mobile web applications to be instantly available on startup and pre-loaded with data. With Gears, mobile web applications will behave more like traditional installed mobile software. Unlike traditional mobile apps, a mobile web application will always have the latest software version and not require the sometimes complicated installation and upgrade process.

At the moment, Gears only runs on Windows Mobile 5 and 6, but other platforms should be soon to follow. Google’s mobile offering Android will undoubtedly come bundled with Gears when it ships. Apple’s iPhone SDK rollout on the 6th of March will open up the iPhone to countless waiting developers. Let’s hope that Gears for the iPhone will be released soon after. If Apple were to bundle Gears with every iPhone and iPod Touch, then there could be millions of potential users of Gears-enabled mobile web applications.