AJAX

AJAX
is something I have hear a lot lately and still don’t know what all the hubbub is about. I know one main reason, DHTML is big right now, especially since Google started using it for their web apps. But now I see those Google apps being coined as AJAX apps and not DHTML. Instead of AJAX why not just call it DHTML and [blank]? Do people just not want to be specific, using a broad term like AJAX instead. So, what is it AJAX or DHTML? My guess it’s both but how confusing.

About the Author, Dan Cameron:

I'm the owner and solution engineer at Sprout Venture, a web solutions company that specializes in web development including WordPress.

I started my first blog in 2003 and transitioned to WordPress in 2004. Since moving to WordPress I've written a few plugins and themes for public consumption. Lately I'm busy engineering/building/coding and have only been able to share a few code snippets.

If you're in need of some web development, web design or custom WordPress plugins and/or themes contact me, I'll be happy to discuss it with you.

Read More »

  • It's using DHTML to draw the results. I haven't looked at the code behind it, but it's probably using AJAX (or similar) to do the lookup from the server.
  • Dan
    That is actually exactly how I thought of it. But I was thinking of a semi-iframe type of interaction, but I knew it wasn't like that.

    Thanks that clears up a lot.


    Would my livesearch be classified as a AJAX or DHTML? it could load on the page, moving everything down on the side bar, but I rather have it float.
  • In the AJAX model, the javascript code is essentially loading a page (or, more commonly, posting a form and getting the reply), so it is making a request to the web server. It usually gets back XML data instead of HTML, so it isn't technically "loading a page", but the concept is similar.

    If it helps, you could think of it as loading the other data in a hidden frame (or tab), while the original page remains the way it is, and then using the results of the server request from the "hidden" frame/tab/etc. to modify the page the user is looking at, without that page itself making the new request/submission.

    Now think of that hidden frame/tab as being just a javascript object (which is what it is) that can do all the same things. That's what I mean by "behind the scenes", since it's not actually posting from a browser page.

    The one downside to this (that's not a concern for most people's stuff) is that you can't do multithreading in javascript, so for the high-performance chat application I mentioned earlier, I ended up having to rewrite the AJAX-like code that was originally in javascript into a Java applet, so that it could do true multiple asynchronous message processing.
  • Dan
    Yeah, I remember that. But it didn't talk about AJAX, which after reading about it is very cool. But even though the browser doesn't reload the page it still refreases after a call to retreive the data.

    Would an easier way of describing it be:
    HTML, PHP, DHTML...: Creates a flat page, a page that needs to be reload/refreash by the browser to parse the data from the server.
    AJAX: Retrieves data without a reload/refreash of a browser. All "behind the scenenes".

    Behind the scenes means? Is the browser getting the data behind the scenes or...?
  • talked before about a chat application I did using this technology several years ago (before the term AJAX was around).
  • Dan
    I guess the big deal is reloads. With AJAX or DHTML you can comment and the page wouldn't need to be reloaded. Like GMail and others. D
    uh, should have thought about it a little longer.
blog comments powered by Disqus