Christian Heilmann

Creating progressively enhanced DOM applications with ViewsHandler

When I taught a bunch of students last month the ways of the DOM and explained progressive enhancement they were very happy about the ideas but rightfully exclaimed that DOM scripting can get verbose and repetitive. This is when I had to idea to write ViewsHandler , a small framework to write DOM applications.

ViewsHandler is not meant to be a JavaScript templating engine, as I found that whilst you have to create a lot of HTML with DOM, the parts that change in the app are not that many. Templating engines would replace the whole view, ViewsHandler instead offers you to create HTML, add it to a shell or application canvas and store references to the parts that change. That way you only create your HTML once and then only do minor changes to cached DOM elements when you need to.

As a demo I created a small Flickr slide show using ViewsHandler which was exactly the task that I had given my class :)

What do you think?