Ajax What’s it Good For
February 24th, 2007 by Michael Gray in IdeasIf you're new here, you may want to subscribe to my RSS feed. Read my top posts or learn more about Michael Gray. Want more frequent updates follow me on Twitter. Thanks for visiting!
OK can anybody please tell the advantage of Ajax aside from the eye-candy and the ability to say it’s “Ajax”? Ajax pages don’t load faster, in fact I think they load incredibly slower. Maybe that’s because I design my pages with CSS to load and move like a greased pig and not bloated down with nested tables and javascript (this blog is not an example of that) I notice the hang time. I don’t get any extra functionality from it, in fact it works less efficiently since it breaks the back button and other established web conventions. So I ask you Ajax what’s it good for?
Sphere It










February 24th, 2007 at 9:06 am
Ajax is good for making web pages look, feel and act more like local applications. It does save load times (I only use it to update a portion of my website - navigation and other stuff stay there, only the content changes) and Ajax definitely saves you traffic.
It just depends on how you use it.
February 24th, 2007 at 9:34 am
Personally my number one use for it is data management applications on a intranet where I know the users are going to be running a good machine & have ample bandwidth. The ability to quickly load subsets of data for manipulation and preview makes it invaluable.
For general population use, I really only use it for forms. Its nice to allow the user to fill in and submit data with out leaving a page or breaking away from their regular use of my site.
February 24th, 2007 at 10:10 am
say you have a company with 30000 employees. every app you make as a corporate intranet web developer uses a drop down list where users can select other employees. instead of sending down all 30000 options with a drop down list (option select), it’s better sometimes to use a control like a autocomplete google-suggest type box.
webprofessor is right on the money. for forms and controls, not for navigation.
February 24th, 2007 at 10:11 am
Ah, the light bulb went on. If being a Google curmudgeon gets me X amount of attention, then being an AJAX/Web2.0 curmudgeon too will get me X+Y amount of attention, yah?
To complete the Orlowski-esque transition, you’ll also want to pick a fight with all bloggers. You are one, so I don’t know how you’ll finesse that. But I have faith in you. Eventually it will work so well that people will send you free user-generated content:
http://www.theregister.co.uk/2005/10/19/web_two_point_nowt_letters/
But it can be a lonely path to be the Angry SEO. Don’t forget to stop and smell the daffodils.
February 24th, 2007 at 1:01 pm
I’m with webprofessor, too. It’s overkill for most general population use, particularly for webzine-type sites. For the bannerwhores among us, it has the potential to decrease pageviews.
That said, for the more sophisticated/savvy web user, I’ve recently seen some demos of extraordinarily impressive stuff (like marking links on a map within an area defined by the user’s cursor). Give it some time and I think we’re going to see intuitive, interactive site nav that will be similar to the interface you’re seeing on the iphone.
February 24th, 2007 at 1:05 pm
What in the world is Matt trying to say? Is he writing in code?
February 24th, 2007 at 1:08 pm
I have my doubts thats really Matt
February 24th, 2007 at 1:39 pm
Webprof, I would agree.
February 24th, 2007 at 1:56 pm
I’ve used AJAX in an SEO context to prevent the proliferation of URL’s with various parameters with the hope of avoiding losing credit for inbound links.
So for things like sorting database results, you traditionally would have have a URL like biglist.asp?sort=name&order=1 and biglist.asp?sort=name&order=1 with n*2 permutations of the sortable parameters.
With AJAX you have a JS link activate a call to the server and return the various sort results in XML.
So if a user wants to link to the page, they can only link to biglist.asp. My theory was this would help concentrate your inbound links on a single URL.
So this means you can stop worrying that Google will be smart enough to realize that 25 inbound links to biglist.asp?sort=name&order=1 and 25 in-bound links to biglist.asp?sort=name&order=2 count as 50 links to biglist.asp, as opposed to Google deciding that you only get credit for 25 to the first url since they (might) have deemed the second variation duplicate content.
February 24th, 2007 at 2:06 pm
>user wants to link to the page, they can only link to biglist.asp
I’d been bitching about that as a flaw and you’ve made it a feature, Jeremy. Good one.
February 24th, 2007 at 2:55 pm
Like you said yesterday, it’s good for tracking your mouse movements.
February 24th, 2007 at 3:03 pm
Ajax is good for reducing the number of forms that need to load. For instance I SEO for several debt consolidation sites. Within the call to action on the side bar it uses ajax for showing the correct sub-application. So when they tick the response request box; by email, snail mail, or going ahead and filling it out online the appropriate form fields drop-down. This reduces the amount of fields that show in the cta, which increases conversion exponentially.
Assuming you know that human nature is the ‘path of least resistance’, this results in a 40% higher conversion based on A/B testing. They see 4 fields that they need to fill out, but once they get past name, number, email and debt amount they must tick the box asking how they would like to be contacted. If they select to furnish the information rather than the other options then Ajax expands the form and has 4-5 additional fields to fill out.
So to answer your question, when used correctly it reduces the need for additional pages and/or fields so that the field look minimal and the end-user is more willing to fill them out. Once they get to the online application part of the page with the Ajax they have mentally committed themselves and will fill the rest out as well.
GaryTheScubaGuy
February 24th, 2007 at 3:10 pm
As a CS guy, I always viewed a database result’s sort order as a state variable, and not appropriate for permanent things like canonical links.
Besides, I don’t make the rules. You know who does.
February 24th, 2007 at 3:29 pm
Fake or not, that Matt Cutts fellah sure is on to Michael’s traffic generating secrets eh? ;~)
I am interested in finding a use for ajax as well so the comments in this post are useful, thanks.
February 24th, 2007 at 3:31 pm
There’s a huge misnomer about Ajax ‘loading slower’ or ‘messing up sites’. You need to understand Ajax to recognize what’s going on.
Classic HTML: You submit a button on a page and the page posts the information to another page that then renders.
Ajax: You submit a button on a page and the javascript posts the iformation to another page that sends the proper information back and renders it.
There’s really no difference. Ajax is simply a ‘buzzworthy’ term but it simply interacts through javascript how a page transition would.
As for speed, well-constructed Ajax should load much quicker and be less of a stress on your site if built efficiently. The reason is that you can manage ‘chunks’ of data rather than entire pages.
As for CSS - passing visual elements with Ajax should absolutely be a no-no. You should simply be passing back and forth the minimal data and forming it appropriately using styles. There’s a ’sister’ technology called AHAH that passes HTML back and forth - again, presentation should be separate from the data. Take a look at http://payraisecalculator.com and http://www.addressfix.com - both utilize Ajax but in a manner that makes it a better user experience.
Google Maps, Gmail, Yahoo Mail, and others are all constructed brilliantly with Ajax. I would add that there are great places to use Ajax and stupid places to use it. It’s only as good as its gains in Usability and efficiency.
Aside from Comment posting, I’ve really not seen any viability in utilizing a lot of Ajax on blogs.
Regards,
Doug
February 24th, 2007 at 4:56 pm
@aaron actually I thought the comment was pithy and lacked a point that could be applied to Michael.
February 24th, 2007 at 6:13 pm
@webprofessor I’m pretty sure he was saying I would use a projects web2.0-ajaxiness to generate any extra buzz.
@doug gmail is one of the one’s I complain about, it always hangs and thats on every PC I use it on. I hate that back button doesn’t work. Those two apps are nice but how does using ajax help make the better?
@jeremey interesting but you could accomplish the same thing with some creative URL construction, robots and meta tag implementation and not lose the deep-linkability of the url.
Curious Matt has the only reason that attracts me in any way. Every other one seems better solved with non-ajax technology.
February 24th, 2007 at 6:26 pm
Here is a good explanation on using Ajax to improve performance: http://www.tbray.org/ongoing/When/200x/2006/02/14/AJAX-Performance
February 24th, 2007 at 10:24 pm
Ajax is good in situations where you have HTML forms, and it’s great for backend apps (the extra initial load time saves you in the long run since the page only needs to load once, not 20 times).
Here’s 2 good user-interface improvement features of AJAX that immediately pop to mind:
> AJAX popups that can load in a layer over the normal page content. Great for a few things, but there’s lots of potential for this to be overused.
> Form usability (A good example is when you select a Country from a dropdown list, and if you select, say Canada, the next field becomes a “Select Province” option.
February 24th, 2007 at 11:04 pm
Some things dont need a new page (refer a friend, say if something is useful, vote something up or down).
Its just a way of removing a pageload - some people go overkill, but it has its uses.
February 25th, 2007 at 11:04 am
I think AJAX is best for Enterprise applications.
Where everyone in the company can access them, including executives.
So that everyone in the world that works for that company can use the software as if it were a desktop application, but dont need it on their local machine, which cuts IT costs significantly.
So only one source will need to be fixed if a problem is presented, rather than 1254 different machines out of the 50,000 in the company.
TIBCO’s case studies are a few good examples of where an backbone set of db’s coupled with ajax interfaces can be extremely helpful.
February 26th, 2007 at 3:18 pm
The point of Ajax isn’t to make a web site “Ajaxy”. It’s to enable functionality not possible with normal HTML. For example, the canonical example is Google maps; imagine how annoying that app would be if it refreshed the page every time you tried to scroll.
The reason so many sites use AJAX and are horrendously slow is they are coded by designers, not programmers, and they use monolithic libraries instead of optimized code. It’s a by-product of the whole 37signals/Rubyonrails philosophy, which is focused on being easy for the programmer and leaves little room to optimize. Not coincidentally, some of the worst AJAX offenders are RoR-powered sites.
February 27th, 2007 at 3:22 pm
I agree wholeheartedly that many current AJAX sites are not up to par. However this does not mean AJAX is slow and clunky; it just means that the implementation isn’t up to scratch.
Take Microsoft Live Mail for example. It loads in everything at once - contacts, recently updated spaces, all sorts of things that you’re probably not directly interested in; however those things help useability (such as auto-complete when you’re typing in an email address). The initial download is slow, but subsequent requests are quick since Javascript and CSS is locally cached.
When I introduce AJAX into a site, I do so purely for useability reasons; to empower the technically-unsavvy to better manage the tools that are provided for them. Forcing AJAX upon users is a bad idea and should only be used to improve existing functionality; not to replace it entirely.
March 16th, 2007 at 10:43 am
web 2.0 baby!!!!!!!!!!!!!!!!!!!!!!