Offline Web Applications

The technology we know call Ajax was originally created to bring a desktop application into the web browser. Today’s heavy web applications have taken the opposite approach, stretching the web browser to its limits and looking for a new home on the user’s desktop. Offline access is a hot development topic of 2007, bringing your favorite web applications to the desktop for local storage and data access when disconnected from the data cloud and software as a service.

In this week’s podcast I sat down with Brad Neuberg, author of Dojo Storage and Dojo Offline Toolkit, two open source JavaScript libraries enabling the next wave of rich web application development. In our podcast we discuss the demand for offline web components, the current state of the industry, and best practices found across multiple product offerings on the market this year.

Why does the world need offline access?

Even in a world of municipal WiFi, 3G cellular data, and high-speed broadband networks we’re not always connected to grid and the online applications and data we care about. Our important data disappears while we’re on an airplane, commuting to work, or attending a conference. Offline access creates an additional layer of reliability, extends the reach of web applications, and improves application performance by moving important data closer to its users.

Local storage and sync

Offline web applications have two major components: local storage and synchronization with the cloud. Storage should be enabled on a per-user basis, accepting the restricted rights and access on the local machine. Synchronization is a tricky problem full of mid-air collisions and conflict resolution, causing developers to make a few smart decisions instead of overwhelming the user.

Modern developers have access to megabytes of local storage using browser-based storage technologies and Flash cookies, each bound to the requesting domain. Local storage has evolved beyond cookies, storing large amounts of web application data only a few inches from your keyboard. Frameworks such as Dojo Offline Toolkit abstract the differences between browsers and configurations in much the same way as a toolkit must handle asynchronous request methods.

A local web proxy handles synchronization and graceful fallover with online web services. An offline user sees the exact same user interface and functionality of your web application while offline, yet the browser is talking to a small local server instead of your datacenter. The proxy queues up requests for the remote server, polling for connectivity and replaying any actions when your remote server becomes available.

Performance increases

Placing frequently accessed data on a user’s local machine leads to new performance gains and application capabilities. Just as a network proxy might cache frequently accessed webpages for fast access, your local web application proxy already has your most used data available on your local machine. This local server can make batched server requests, submitting 10 actions at a time and persisting its connection until synchronization is complete.

A web application with offline access capabilities will enjoy faster performance even if they never disconnect from the network.

Current product offerings

Dojo Offline Toolkit is a good way to gracefully enhance a web application, but it is not the only offering available. Over the next six months we’ll see many new offline products and toolkits for almost every type of developer. Here’s a quick list of options, broken down by programming language and web framework.

ActionScript 3
Adobe Apollo
Java 1.5+
Zimbra Desktop (MPL)
JavaScript
Dojo Offline Toolkit (BSD)
Firefox 3 Offline
Python with Django
DjangoKit
Ruby on Rails
Joyent Slingshot

Web developers might gravitate towards a particular toolkit based on their existing programming language of choice or a best-of-breed winner may emerge. It’s still a bit early to tell.

Podcast details

I cover all these topics and more in this week’s podcast on Offline Web Applications with Brad Neuberg. Our 25-minute conversation is a 12 MB download.

Listen to this Offline Web Applications podcast directly on this page using Flash Player.

  • Posted
  • Updated at
  • No comments

Add a comment

Some comments may be placed in a moderation queue to ensure topical relevancy. You may contact author Niall Kennedy directly if you prefer to comment privately.