So you’ve heard about Konfabulator, that fabulous little engine running at the heart of Yahoo! Widgets. The Widgets are cute, and it all looks pretty simple to do. But why build one? Well, the honest answer is that quite often, you don’t. There are lots of times when making a web site instead would be quicker, easier and simpler. Widgets are not a web replacement. But there are lots of things that Widgets provide that a web page doesn’t:
- Persistence, persistence, persistence.
- Persistent presence: nobody keeps a web page open all day. No, really. Obviously, one use-case Widgets already have heavily covered is information that changes a lot: stock prices, the weather. And with the advent of the Dock in 4, you don’t even have to worry that your widget is going to take up too much space: your users can hide it and bring it back up whenever they feel like it, and you can build a mini-display for the dock to alert them when something interesting might be happening.
- Persistent use: are you building a messaging application, and you’ve considered building a little popup window that users keep open all the time to keep track of their messages? Then you were already considering building a Widget, just on the wrong platform.
- Persistent data: does your application play with a lot of data that it’s tedious to pull in from a network? Is it possible your users would want to use their data offline? Would a client-side cache improve the performance of your app? Widgets have access to the filesystem and their own, local SQL database. If that doesn’t make you giddy with possibilities, you’re not the developer I thought you were.
- Desktop interaction
Web applications are an amazing, wonderful hack: a medium that was designed to display static pages of information has been twisted into an application development platform. But despite all the joy that brings, it remains fundamentally a hack. Some applications are just too rich and too complicated to be made in a web context, or worse, when made in a web context their performance makes them unusable. Konfabulator on the other hand was built to make applications from the start, and it shows.
Note what I said just now: applications, not toys or gimmicks. Widgets are not a web replacement. They’re not web 3.0. They are a completely new breed of desktop application: a term we somebody threw out in the office as a joke was Desktop 2.0, but that’s really what we’re talking about. Persistent, performant, web-connected, and a damn sight easier to build than Java or C++ or any other desktop-application development language you care to name.
The thing about Widgets that endears them to me as a development platform is that they get software development the right way around: build the interface first, and hook the functionality into that. This is such a simple idea, and yet there’s no desktop development language that works this way: yes, there are visual ediitors for C++ and Java, but they are just working with a set toolkit: the code is actually central, and if you want to do something out of the ordinary with the interface, you have to go back to the code. Because the truth is that for the vast majority of applications, the processing that’s going on is minor, and all the value is in the interface: presenting the right information at the right time, in the right way. Widgets let you concentrate on that.
Not all roses
Widgets are not the be all and end all. They do not replace desktop applications, nor do they replace web applications. Instead they complement both, and produce a useful middle ground, where a web dev like you can create something that looks and works like a desktop application.