Friday, October 20, 2006

Widgets! A new programming direction?

I always hated the use of the term “widgets” for real software things. It was a term that was reserved for theoretical objects of production in economics classes, with no defined use or purpose. But, today, widgets are coming to be known as little applications that have become quite useful and personal. My first awareness was its use by the Konfabulator technology (Konfabulator has been bought by Yahoo! to become Yahoo! Widgets). First implemented on the Mac, Konfabulator was an engine that supported the presentation and use of their little widgets. Later, they provided the same functionality for Windows so that the same widgets could run in either environment.

It turns out that their little idea has spawned a lot of copycats. With the release of Apple’s OS X, they’ve included similar functionality called Dashboard. OpenSource efforts are pushing their own solutions with varying approaches: Mozilla’s XUL/XULRunner and WinBinder. Microsoft, of course, is not to be left out, so with Vista will come Windows Gadgets, Microsoft’s copy of the the technology. Similiar, too, is Google’s Gadget plug-ins to its Google Desktop.

There are several concepts that tie all these technologies together. It allows small simple applications to be easily distributed and used while allowing extremely simple development processes.
  1. Scripting language
  2. Simple packaging
  3. Common, available technologies
Implementation Language
Choosing a scripting language is essential to encouraging development of the little “applets” that proliferate in these environments. A simple text editor is all that is needed to compose the logic that makes these programs run.

All the Gadget and Widget approaches except for WinBinder use JavaScript as their native programming language. Since a large audience of developers have built their skills building powerful cross-platform web pages using JavaScript, support for that language minimizes the barrier to entry for that developer audience.

Packaging
The implementations typically include the implementation code files, resources such as image files, and metadata files that describe the characteristics of the little application. They might require a specific directory layout. For convenience, most can be packed into a single distributable file. And, because of its ubiquity they use the “zip” file format (originally made popular on PC platforms with PKZIP). Rather than using the .zip file type, it is usually changed to something specific; e.g., “.widget”, “.gadget”, “.jar”, etc.