Wednesday, January 25th, 2006
I wrote some time back about progressive enhancement with Ajax. It’s a very simple idea:
- First, build an old-fashioned website that uses hyperlinks and forms to pass information to the server. The server returns whole new pages with each request.
XMLHttpRequestinstead. You can then select which parts of the page need to be updated instead of updating the whole page.
Jeremy points out that the server-side will need to flexible, so you can return either the entire page (for the initial version) or small blocks (for the Ajax version). While he suggests this should be done upfront, you could also take an agile view and do it only after creating an initial, non-Ajax, website.
Worth noting there are libraries like ComfortASP that (as far as I can tell) automate this pattern. i.e. You code up a conventional web app and they’ll intercept things such that web remoting can happen automatically if it’s supported in the browser.
This alone won’t make applications really rich – Ajax is a lot more than fusing blocks of content onto the page. However, it’s certainly a handy technique for making applications a bit richer, while gracefully degrading and with minimal programming effort.
Posted by Michael Mahemoff at 10:07 am