website stat

Why AJAX does NOT suck!

I couldn’t avoid noticing this post from Frederico Marques where he cites an article written by Jakob Nielsen. The article’s entitled Why Ajax Sucks (Most of the Time) and reflects his opinion on why AJAX is a Bad Thing.

I could take all night long enumerating plenty of good things that the AJAX methodology has been providing in order to show my point of view — which clearly conflicts with Jakob’s. I, for one, believe AJAX is a Good Thing. Nevertheless, I think it’d be more interesting if I resign myself to comment out what he said. Here we go…

Navigation does not work with ajax since the unit of navigation is different from the unit of view. If users create a bookmark in their browser they may not get the same view back when they follow the bookmark at a later date since the bookmark doesn’t include a representation of the state of the content on the page.

Even worse, URLs stop working: the addressing information shown at the top of the browser no longer constitutes a complete specification of the information shown in the window.

After reading this sentence I realized that the author does not have any clue on what he’s talking about. At least, he seems not to understand the big picture. Writing a bad website that lacks usability and breaks standards has nothing to do with the technology you use but rather with the guy who’s writing the code. One can use any techonology available to build a piece of junk — being it with AJAX or just plain XHTML.

Another important thing is that AJAX has plenty of uses. AjaxPatterns gives an idea of what can be achieved by using AJAX — which clearly outstands the URLs issue. Nevertheless, there are some webpages where the URL is not important. Why would one want to share an URL from Meebo or from GMail. I definitely don’t see any point in that.

In conclusion, you only break URLs if you’re not cautious enough while using AJAX. It is a great set of technologies (far more than XMLHttpRequest) that must be carefully unleashed in order to prevent such things from happening.

Thus, 13% of users would not even be able to use a site with ajax.

Someone’s afraid of new things. When Javascript was initially released you could count by a hand’s fingers the number of people using it — Internet Explorer took some time before conviniently support it and Netscape idem. But that didn’t stop people from using it.

Some time ago most of the websites only worked correctly with Internet Explorer. Nowadays, and thanks to Mozilla Firefox, most of the websites work correctly because standards took a more important role on the development of the website. Why would you bother using Firefox if the website wouldn’t work?

See the logic? Of course new things tend to have some inertia but AJAX got on track pretty fast. AJAX will not stop mobile phones users from accessing the website nor will prevent speechers from doing their work. Actually, I think that AJAX could improve the accuracy of what should be read and how it should be handled.

the BACK button in the browser simply didn’t work with ajax sites

I have some websites done by me that make heavy use of AJAX. And the BACK button works. Should I presume then that I’m a very talented programmer that should have a job granted at the best company there?

You fell into a fallacy. Using AJAX does not implicity mean that the BACK button wtill stop working. Obviously you could easily do it. Just fetch the content using XMLHttpRequest and use document.clear(); and document.write(content); to rebuild your webpages. It’s pointless though.

As I pointed before and avoiding repeating myself, AJAX has plenty of uses. Take, for example, dynamic checking while filling a form. You could automatically check if a username is available as soon as the user types it. Does this turns into the BACK button not working? Not at all. Actually, I’ve lost the forms content several times due to unsolicited links that are not targeted as _blank. That happened to me while writing this very same post and I lost the content. Only if Wordpress had an auto-save done in AJAX…

Newsgroups like ajax.web.technology are filled with questions from Web authors who desperately need to know why their ajax doesn’t work as intended. Ajax is currently so hard to learn that many page authors write buggy code.

This is completely nonsense. A statement like this should be censured. Following this logic then Java is very hard to learn. After all, their newsgroup has so many questions regarding why their code didn’t work as intended. And Python? Damn, these two languages must really suck since they have so many users questioning..

Or may it be because EVERYONE is embracing AJAX, from kids to experienced programmers? Oh well…

Last conclusions: damn bad article. At least he could be less biased and try to explain the whole picture. This is way more interesting.


4 Responses to “Why AJAX does NOT suck!”

  1. Cláudio Franco
    Published at December 6th, 2005 at 11:50 pm

    Offtopic…

    It is a great set of technologies (far more than XMLHttpRequest)(…)

    Unfortunally yes, because i can’t understand why “moo.fx” is AJAX…? Where is the X… letter? in the “.fx”?

  2. Cláudio Franco
    Published at December 6th, 2005 at 11:55 pm

    Erm… forget…

    X for XML
    X for XHTML…

    Feel free to delete the posts

  3. mlopes
    Published at December 7th, 2005 at 12:23 am

    :-)

  4. S.
    Published at December 7th, 2005 at 1:41 am

    That site is an hoax. Jakob’s real site is http://useit.com
    Why would he have a look alike page in another domain ?

    Hoaxes are fuelled by this.
    Please read the last line:
    “This is a spoof article. Please compare it with the original and you will see how little it has been changed.”