Network connectivity is costly, and users don't like to pay for
each byte they download. With the advent of multiple networks, a user might want
to do heavy uploads and downloads in a WiFi zone, and only minimal transactions
when on GPRS. If our application could provide this flexibility, there are good
chances it will be grabbed like sweet candy by the users.
So how can we achieve OCC on mobile devices? While some amount of caching has
always been part of mobile applications, OCC is a new thing for the mobile web.
As such, OCC is new even for web applications! The OCC poster-boy solution is
Google Gears (http://code.google.com/apis/gears/)??”a browser extension that
provides an API to run applications offline, complete with a caching server, an offline
SQL database, and an asynchronous worker pool that lets you do the heavy lifting in
the background. Google Gears is certainly an innovation whose time has come.
Mobile Web 3.0?
[ 210 ]
The following figure shows the architecture of Google Gears (or other OCC models).
Application UI
Local Data
Access
Server Data
Access
Data Switch
Offline Database
Sync Engine Internet
Online Database
The Dojo Offline Toolkit (http://dojotoolkit.
Pages:
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281