BarCampLondon: Jeremy Keith on Hijax
I'm sitting in Jeremy's session, hearing about his Hijax system for "progressive enhancement". Progressive enhancement takes a new look at what we used to call "graceful degradation". Basically, it's starting with the content/symantic layer and layering on additional functionality on top of that.
He's currently talking about how best to implement JavaScript behavior into your HTML application and the method he's showing me is so close (in intent and implementation) to the code behind method I advocate in Flex and Flash development.
The Hijax approach:
- Begin using traditional page refreshes
- Data sent to server via links and form submissions
- Intercept (hijack) those links and forms using unobtrusive javascript
- Send that to XMLHTTPRequest
- Server returns just the information that's required
Server side requirements:
- Back-end architecture must be modular
- Web pages must be modular (components/APIs)
The paradox:
- Plan for Ajax from the start
- Implement Ajax at the end
When to use Ajax:
A page includes a form. When the form is submitted, the same page is returned with just part of the page updated (eg. blog comments.)
Clicking on a link returns the same page but with a different view on the data (on thing has changed.) Product ratings, filtered product set, etc.
Jeremy's method uses the XMLHttpRequest as a dumb waiter. Client-side processing is kept to a minimum.
Comments
by Frances Berriman on 2006-09-02 15:08:37