Saturday, June 11, 2005

Proposed event sourcing in HTML 5

From the Ajaxian blog, a rundown of proposed HTML 5 features from WHAT-WG. They also link to Hixie's slides, which don't work in Firefox. Feh.

There's a lot of interesting stuff that walks the line between semantic vs. presentational, etc. My favorite, though, is this the proposal for event sources:

<event-source src="/some/path" onevent="process(event)"/>

This is exciting to me because mod-pubsub comes extremely close to this implementation with their JavaScript/DOM engine, which allowed HTML elements to process and display remote server events with just a few non-standard attributes:

<div kn_topic="/some/path" kn_onmessage="process(event)"></div>

Of course we had a very freakishly large and complex JavaScript engine to handle all the Ajaxy goodness. At the time, we called it a microserver, since the idea was that the JS engine could serve events from client to server as well as to other parts of the client. A web application could comprise of several mini-applications tied together with a JS message bus — which isn't so different from desktop OS programming.

At one point it was generally agreed that the notion of a microserver wouldn't be exciting for much longer, since it seemed to make sense that this "JS message bus" would eventually be baked into the browser — if only people would see the usefulness of it! (This was in 2001; Google Suggest and Google Maps were a few years away.)

For something like WHAT-WG's event-source to work, there has to be support for such functionality in the browser. But I'm glad to see this development, and am looking forward to the time when we won't have to drag around additional JS libraries to implement event-driven web apps.


At 10:11 AM, Blogger scottandrew said...

Broken? How so?


Post a Comment

<< Home