Thursday, January 18th, 2007

Event-Driven Web Application Design

Category: Articles, Yahoo!

Christian Heilmann is talking about Event-Driven Web Application Design on the YUI blog:

The crux of the matter is that we don’t really yet understand how to build a real web application. We take tried and true methodologies that cover other development scenarios and try to shoe-horn them into something that helps us to achieve what we want on-time and within budget (and when was the last time that happened?).

The other problem is that we approach web application design with browser limitations in mind and plan only for what browsers can do rather than what the application should offer the user.

When it boils down to it, the main differentiator of a web application and a web site is that an app has much more interaction and is process-focused rather than content-driven. Users come in to achieve a goal: They provide data to the application, they use the application to enhance that data, and then they expect data to come out. They interact with components of the application and expect them to do something that brings them closer to their goal. It is of utmost importance that we plan for how users interact with the product and react accordingly.

When trying to accomplish this in the browser, there is one core technique at our disposal: Event handling.

He details the event-based scenario when he details planning for an Event-Driven Application, and taking events past the DOM. Do you agree?

Posted by Dion Almaer at 9:10 am

4 rating from 24 votes


Comments feed TrackBack URI

Wholeheartedly agreed. In the ideal case, a developer should be able to attach hundreds of handlers to individual objects for separate events (eg. mousedown, click and so on.) My experience has been that in reality, browsers really choke with dynamic assignment and removal of large numbers of event handlers, so the delegation model (ie. a top-level listener which routes events as necessary to targets of those events) works excellently.

Comment by Scott Schiller — January 18, 2007

we talked about something similar at JavaOne last year about taking Dojo or YUI widgets on the client and pairing them with Server-Side components such that events, with a proper ID scheme could be routed back up and executed on the server, leaving a 1:1 relationship between what would be service end points and client-side widgets. The benefit here is that the end developer just says they want a ‘datePicker’ component and the Server-Side framework will mediate the events and end points for you– leaving you with a single widget declaration, not a single widget declaration, then coding/publishing N endpoints to supplement the one widget.

Comment by Jacob — January 18, 2007

Are you getting paid for your awesome “Do you agree?” addition to his article?

this place rocks lol

Comment by abc123 — January 18, 2007

Second abc’s comment. Dion, part of why I come here is for critical commentary! Thanks :)

Comment by Matt — January 18, 2007

Sounds like we’re moving towards reimplementing X-windows cross platform. :)

Comment by grinktt3n — January 18, 2007

I am amazed that every time there is a post about “you guys are not real” the poster doesn’t add a real name. :)

Comment by Chris Heilmann — January 18, 2007

I think this is good aproach (i’m using YUI and CustomEvent) and maybe a way to create flexible apps. I agree with Chris that we still don’t realy know how to build web apps. We need solid guidelines. Event-Driven web app desing can be one of them.

Comment by Wojciech Siudzinski — January 19, 2007

I agree with doing event-driven design… This is exactly why I implemented topics for publish / subscribe programming in Dojo. It was pretty trivial thanks to the great AOP stuff in Dojo, but I’ve got to stake my claim to something ;)

Comment by Jason Carreira — January 19, 2007

Jacob, while you talk about it, others have been doing it for a long time.

Google “Echo2”

Comment by Silly — January 21, 2007

Just a note, our Helmi Open Source RIA Framework has a fully implemented event driven application programming model for AJAX / Rich Internet Applications, including passing the events to server and very efficient AJAX communications components. Excactly a kind of platform as described to be ideal in the article. So, download our User Interface Framework and start developing event driven web applications today. :-)

Comment by Juho Risku — January 23, 2007

Leave a comment

You must be logged in to post a comment.