Tuesday, April 21st, 2009

An Introduction to W3C Widgets

Category: W3C, Widgets

The king of browser compatibility tables, ppk, recently posted an introduction to W3C Widgets:

The time has come to talk about the W3C Widgets part of my job. Exactly what is a widget, how do you create one, why would you want to, and which systems support them?

Personally I firmly believe that widgets are the future of the mobile web. They are easy to create, they’re based on open standards, they save the end user quite a bit of network traffic, and many people around the world already know how to create them.

In contrast to other recent publications about widgets, I’ll tell you the whole story — or rather, a condensed version thereof.

He provides a concise definition of what is meant by “widget”:

Essentially, a widget is a local HTML/CSS/JavaScript web application. A mobile phone user downloads a widget once, and from that moment on he has a web application stored locally on his mobile phone.

He then elaborates on the value provided by widgets:

The beauty of the widget model is that, even if this spreadsheet application needs 200K of custom JavaScript plus a few libraries, the end user has to download these scripts only once instead of every time he starts up the app, as in the traditional web application model. After the initial download the entire application is installed locally and can be fired up from the local files.

Many web applications will want to display fresh data, and therefore most widgets will fire an Ajax request as soon as they’re started up. For that they need a network connection and some data traffic.

Nonetheless, the fact that the application itself doesn’t have to be downloaded every time the user starts it up diminishes the network traffic by a lot; and that’s important on mobile phones with their unreliable and sometimes crawlingly slow connections.

This all ties into the Open Web Platform meme that’s been circulating (and given a big boost by the Palm Pre), which ppk highlights:

In itself the widget concept is no different from the countless application models currently being set up for the iPhone, Android, Blackberry, Windows Mobile, and many more systems. These, too, will put the core files on your phone and use the network connection only for data traffic.

All proprietary systems, however, require programmers to train themselves in new skills and techniques that are not interoperable. Widgets, on the other hand, use the open web technologies that hundreds of thousands of developers all over the world are already familiar with.

Better still, widgets will eventually conform to the “write once, run anywhere” principle; though right now that’s not yet the case.

Personally I firmly believe that widgets are the future of the mobile web. They are easy to create, they’re based on open standards, they save the end user quite a bit of network traffic, and many people around the world already know how to create them.

So, how do you create a widget? Thankfully, it’s simple, sort of:

Widgets are nothing more than zipped websites. You create an HTML file, add as many CSS, JavaScript and image files as you need, zip the lot, change the extension to .wgt and it works. Just like that.

Well, almost just like that. The rest of this entry explains the “almost.”

And, check out his blog post for more details.

Posted by Ben Galbraith at 11:59 am
Comment here

++++-
4.2 rating from 24 votes

Comments Here »

Comments feed TrackBack URI

Leave a comment

You must be logged in to post a comment.