Offline Web Apps now a lot more achievable

Early last week the Dojo Toolkit launched a toolkit extension for making the development of offline web applications a lot easier. From the launch announcement:

“Dojo Offline is a free, open source toolkit that makes it easy for web applications to work offline. It consists of two pieces: a JavaScript library bundled with your web page and a small (~300K) cross-platform, cross-browser download that helps to cache your web application’s user-interface for use offline.”

The 300K download is actually a locally installed web proxy that makes the detection, caching and online/offline transitions seemless. Part of the approach is to define a framework for handling the connectivity so that it is as easy and transparently from an end-users’ perspective. This includes a Dojo UI Widget that detects the presences of the Offline Proxy, prompting the user to download and install it. Being only 300K makes this a very quick process. If the proxy is installed then the widget will indicate the “connected” status.

This checking of connectivity goes beyond local network connectivity, by sending pings out across the Internet, it actually determines if Internet connectivity is present. This avoids the trap of being locally connected but globally disconnected.

From a implementation perspective the local proxy will cache all those files (XHTML, CSS, Javascript) to ensure that the Web application will still operate even if started offline. Once online the Sync component of the toolkit kicks in, performing a transparent merge operation with the back-end. The reason it is transparent is to avoid confusing the user. Instead the approach is to perform the sync transparently but let the user view the audit log of what happened if they wish too. Most won’t.

The Offline toolkit extends the Dojo offline storage engine. A portable, browser and OS, storage engine. Basically if you are using Firefox 2.x, then the storage engine uses Firefox’s offline storage capability, otherwise it uses Flash as the storage engine. This functionality has been in Dojo for sometime, so is well baked.

At the Web 2.0 Expo, Brad Neuberg (the developer) gave a presentation on the Offline Toolkit; watch is his presentation for more details.

Having the capability to build web applications that are “connectivity” aware is a big boost to the acceptance of web applications. Ubiquitous connectivity is still a dream. The thing is that the way Web applications are designed and developed changes as a result. The MVC structure of your typical Web application now needs to push the entire MVC structure into the Javascript. Rock on PAC! Dojo is well suited for this architecture as it includes many features for neatly structuring the Javascript application and deploying just what is needed and it can incorporate Comet.

No comments Digg this

No comments yet. Be the first.

Leave a reply