Posted by Matt on Oct 08, 2009
AHAH!
I’ve been bulk loading my brain with JQuery recently and loving every minute of that. So much so, I’ve been inspired to put together a few examples to share with people on my team.
So here’s my JQuery AHAH Example.
This example shows off two simple concepts:
AHAH
AHAH is form of AJAX. In lieu of parsing an XML response, we receive HTML from our webserver and insert onto our page. I prefer this since it keeps my JavaScript simple and, since we’re generating markup anyways, keeps the HTML generation in the application.
Progressive Enhancement
The simplest way (and probably over simplifying it) I can describe progressive enhancement is to allow a webpage to work with and without JavaScript functionality enabled. There are several schools of thought on why this is done. Accessibility. Semantics. Etc.
I use this approach for browser compatibility. On a recent internal project, I found that half of my customers are security minded and turn JavaScript off. The other half want a rich Web 2.0 interface. By designing for the first half and then using JQuery or other libraries to add behaviors to the static pages, I can then satisfy those looking for a richer experience.
The Example
The JQuery example I posted on Github is by no means an exhaustive study of both Progressive Enhancement and AHAH. However, I believe it’s a clean simple example of both concepts.