AJAX vs AJAH?

Since I’ve made the jump into CakePHP, I’ve begun using the Prototype javascript libraries. If you’re a Javascript programmer, and have never used prototype.js, you’re in for a real treat. It handles a lot of your cross-browser issues, and gives a really cool API for building Web 2.0 applications.

Anyways, prototype has a real nice function called Ajax.Updater, which makes a call to your server and replaces an element with the returned html. It makes creating an ajaxy application really nice. But is this really AJAX? Or is it AJAH?

AJAX stands for Asynchronous JavaScript And XML. So I came up with the term AJAH, which stands for Asynchronous JavaScript And HTML. Okay, I know that HTML is a flavor of XML, so technically you can say that it AJAH is AJAX, but I still think there is a difference.

XML is primarily a markup that allows you to send data formatted in such a way computers can read and interpret the data. The data can be extracted at a granular level. With HTML, the elements of data that you are passing are usually not extract-able unless you use micro-formatting.

With true AJAX, a call is made to the server, the nicely formatted data is returned and the client application extracts the data from the xml, and replaces whatever elements need to be replaced on a page. With AJAH, a glob of html is returned and slapped into the page.

So, which is better? I’m not sure at this point. AJAH definitely allows you to create a dynamic site that can talk to the server behind the scenes quickly and easily so I’m fine using AJAH.

Also, I’m working on a CakePHP/Frameworks post… Stay tuned.

11 thoughts on “AJAX vs AJAH?”

  1. I’ve seen Ajax-ified comments plug-ins for WordPress, but I’m not quite sure why that would be related to HostMonster. I wouldn’t want my WordPress installation to come with ajax comments right out of the box if you’re referring to the Fantastico installation of WordPress.

    I’m all for Ajax when it enhances the user experience, but I’ve seen more double-posted comments on blogs because the blog uses an ajaxed form that doesn’t give proper feedback such as a spinner, a disabled form, or notification that your comment was posted up above on the page.

    I think Ajax when done right can really improve the overall experience, but can be really frustrating when done only half-way.

  2. So what you’re saying really, is that you don’t like things when they’re not done well. That’s not really anything to do with AJAX :)

  3. I wouldn’t say that html is a flavor of XML. XML is an application of XML, but HTML isn’t. :)

    I know you wrote this post long time ago, but now much much better JS framework is jQuery :)

Comments are closed.