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.
The Hijax approach:
- Begin using traditional page refreshes
- Data sent to server via links and form submissions
- 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)
- 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.