Follow Us

Sunlight Foundation is a nonpartisan nonprofit organization. We depend on the generosity of our supporters to continue our work. With your help, Sunlight can continue to provide you with the most comprehensive, up-to-the-minute tools and resources for tracking political influence.

Take a post-election stand for         accountability!

Support open government:
Donate to Sunlight today!

Donate

Why offline is the new online

by Sunlight Foundation

apollo logoThe history of computing has some interesting trends. First it was all about mainframes. To get anything computed you had to logon to some remote machine so large that if filled a room. Then came along the desktop; desktop apps were (and arguably still are) it. In the 1990's, however, things got pushed onto the web, web sites were the thing, and now with the rise of Ajax, web apps are becoming the new it. Applications such as writely (now "google docs") or google spreadsheets that have the look, feel and responsiveness of traditional desktop applications. I want to predict the next segment of this zig-zag computing trend: offline web apps on your desktop.

In the last couple of months there have been some very interesting developments. Adobe have staked their claim in this area with the announcement of Apollo, Mozilla is already in this arena with xulrunner, and recently dojo announced a forthcoming offline library. Before we get into the specifics though, I want to dig a little deeper into some background and discuss the influence of widgets.

Widgets are really hot now, small focussed applications that serve one or two useful purposes: show the local weather, a simple RSS reader, show what is playing on iTunes etc. The problem is that they are tied to particular browser—opera widgets only work for the opera browser—or tied to a particular operating system—apple's dashboard widgets only work on a mac—or they must be served through a third party host (e.g. widgetbox). This sucks for all involved: developers always want to write once, run anywhere but instead they have to write and maintain slightly different versions for lots of different platforms. Users don't want to search through some complicated table to work out which one they need to download. What we all want is a universal "click to download and install" widget, that does what it says, and that does what it says in the same way on all platforms with the same code. We want a simple app that will float on the window, do its thing.

Desktop app are tied to native libraries for good reason: performance. Fast, efficient Cocoa apps for mac, .net for for windows etc. While Java claims to be universal, it is very slow to launch, there are still UI inconsistencies across platforms, and it can never reach the same degree of performance as native apps for compute-intense apps such as rendering and video CODECs. Widgets are different however. Their functions are typically so simple that it makes no difference. To grab and display the latest blog post entry's title from your favorite blog is hardly going to stress the CPU. So, they can be written in universal language such as HTML+CSS+JS.
The stupid thing is that widgets are all written in the same language: HTML+CSS+JS. Opera widgets and Apple's dashboard widgets are essentially the same under the hood but they just cannot run on each other platforms. Within 6 months we are, however, going to see more universal widgets and desktop apps written in web technology.
Adobe is starting to promote its forthcoming Apollo platform. Apollo will provide libraries for offline storage, will have the ability to read and write to the desktop's file system (which is difficult to achieve in true web apps because of the built in security model), and will have libraries for flash, HTML and PDFs. So to make sure we are clear here: you will be able to write a web app in HTML and have it run universally on all platforms: windows, mac and linux, and further, the HTML can be rendered through the flash viewer so that it is virtually guaranteed to look and operate exactly the same on all of those platforms. As a developer, one can write once, make it generally available for download as an .air file, have it work on all platforms. Not only that but Apollo apps can continuously check for connectivity: you shut down your computer because you are getting onto a plane, no problem. After take off, you open it up and continue as before. Moreover, all of these offline activities or transactions are stacked up locally and processed online as soon as connectivity is restored. You can continue to work offline and it will seamlessly sync to online when it can. Oh, and did I say all of this will be free? [They will make their money through selling more Adobe Flex licenses to developers.] Apollo will be available later this year but the main feature they need to fix is distribution. Currently, one has to download an Apollo runtime and an apollo installer. This is not likely to engender uptake by the mainstream Joe Doe end user. However, unsurprisingly, they do have plans to distribute through the flash player so the back end installation will be seamless.

Mozilla already in this space through xulrunner. So, "xulrunner --install -app gmail" is all that is needed to create a desktop app for gmail. This will provide a local executable that will launch a window to gmail. This can be running independently of any browser. This is from Mozilla so of courser there are Firefox libraries running behind the scenes but the point is that I can have a persistent desktop application running up in say my top right corner of my screen, always there, always keeping me informed of whatever I want to keep informed about, without me having to have firefox or any other browser running and have that window or tab showing. This too will allow developers to write desktop applications in HTML+CSS+JS that run offline. Given the number of developers who know these technologies, this could be a huge boon for desktop app innovation. Again, this allows a write once run anywhere [but with less guarantees about consistent look and feel] and has local SQLlite database for local storage.
Dojo too is likely to be another important player. They are working on an offline toolkit, a "small, cross-platform, generic download that enables web applications to work offline." It will be cross platform, cross-browser, connectivity detecting, secure, with local storage. Sound familiar?

Let me stress that one is not going to be able to take an existing complex, server-side PHP+MySQL web application, type a single command and have it instantly available as a desktop application. (Besides, would really trust your code, even if encrypted, out there on everyone's desktop?) However, this is an exciting area for web-innovation. Watch this space in the next six months. More and more of the web will be seeping onto your desktop. This is why I say offline is the new online.