Slashdot Mirror


Ajax Sucks Most of the Time

Vo0k writes "It seems that everyone is excited with what AJAX promises, and only few look at what it breaks as well. The article at Usability Views offers a critical view at the new Microsoft technology, pointing out some problems it creates, like breaking bookmarking, making the 'back' button useless, problems with printing, accessiblity and more. The single-sided view from the article provides a good counter-balance for all the craze."

41 of 510 comments (clear)

  1. as in all new directions... by yagu · · Score: 5, Insightful

    Up front Disclaimer: I realize the article is "just saying no to Ajax" with constraints. My post here is to the objection I think the article states Ajax problems too harshly.

    Reading the article it seems to me:

    • most of the listed grievances are not unique to AJAX, have been addressed in the past, and are probably soluble for AJAX too. (e.g., how many remember the broken first browser paradigms where there simply was no easy way to get the information from a web page to some printer? It's not perfect today, but it's doable. This problem is ultimately soluble for AJAX too)
    • AJAX is the (to many) latest and greatest. Many will hold on and gain purchase. Some will bail. I think AJAX or some derivative thereof is here to stay. Like technology before AJAX, there will always be naysayers, and there will always be glitches. For this to justify a "Just Say No to AJAX" philosophy is naive and maybe even misguided.

    From the article:

    Ajax is currently so hard to learn that many page authors write buggy code.

    Huh? So? Is this unique to only Ajax?

    Also from the article:

    Many websites that offer users a choice between regular and ajax versions have found that most users prefer ajax-free designs.

    When an article wants to rant or complain about a technology, an un-cited and broad statement like this is a huge red flag. It doesn't state what the percentages are, it doesn't state the reasons for preferences. In the middle of an article espousing "no Ajax", this is a non-sequitor. Please expand.

    I'm having great fun experimenting with AJAX and am getting interesting new approaches for old solutions improving customer and user experiences. I'm not about to walk away from this until a more thorough trial. So far I'm liking what I'm seeing. Yeah, there are glitches to solve, isn't that kind of what we're here for?

    1. Re:as in all new directions... by CaymanIslandCarpedie · · Score: 5, Informative

      It is worth noting this statement at the bottom of the page.

      This is a spoof article. Please compare it with the original and you will see how little it has been changed.

      That said some of the points are valid, but the article was basically showing how those same things were valid at one point for using frames as well.

      --
      "reality has a well-known liberal bias" - Steven Colbert
    2. Re:as in all new directions... by Ian+Wolf · · Score: 4, Insightful

      Ajax is currently so hard to learn that many page authors write buggy code.

      I swear, I've heard the same argument about PHP, Perl, C, and even the concept of object oriented programming. In every case the person uttering those words was an idiot or simply too entrenched in their chosen language to accept a new way of doing something. It all reminds me of a line from Scott Adams' Dilbert Principle. As best as I can recall it went something like this.

      "Every technology has its detractors. I'm sure that somebody once stated that the pointy stick would never replace the fingernail as the fighting man's weapon of choice."

      As for my disclaimer, the only thing I know about Ajax is that its not effective as Mr. Clean.

      --
      "The words of the prophets are written on the Slashdot walls."
    3. Re:as in all new directions... by mpcooke3 · · Score: 3, Insightful

      That said some of the points are valid, but the article was basically showing how those same things were valid at one point for using frames as well.

      For "valid at one point" consider using "always valid".

    4. Re:as in all new directions... by diverman · · Score: 5, Insightful

      I am glad that you made this statement. The whole time I'm reading the article, I kept thinking that it was basing the vast majority of its argument on false assumptions that AJAX is predominantly being used on content pages. The best use of AJAX, that I see, is with improving user interactivity with a web application. Web applications are becoming more and more of a need, and I think this is where AJAX is gaining the most ground.

      The author talks about how "the page" is the basic idea that was behind the Web. Well, I hate to break it to him, but after 12+ years, things have evolved. The notion of the page has long since been an area of limitation with web applications and usability. This is why we've seen the uprising of many technologies in an effort to have more dynamic content interfaces. Users don't like having to wait for a full page load to make a small request within an application. There is complaint about the time it takes. Granted, this is largely a perception thing, but it is the reality of users.

      The type of information being presented on the web has gone beyond thesis papers and simple static articles. The information that users are becoming used to is more complex, as the average user's understanding of relational information grows.

      Now, the author does make some good points... but mostly these are when using AJAX in "pages". In this respect, I agree that overzealous, and possibly inexperienced web developers have gone overboard. But a good web developer considers the effects their choices have on a user, and they make the choice to go with one advantage over the loss of another. I am conscious that search engines can't necessarily index my content... so what! If I don't want it to be indexable, so be it... they can index the more "content" oriented parts of my sites, and users can then find the "features" and applications that use better technologies. The complaint about printing... please! A best practice is to take length articles and break them up into multiple pages. Ummm.. this has the same problems with printing. He kind of neglects to point that out.

      As was stated previously, many of the arguments are presumptuous that the web is all about "pages". I also question the interpretation of his statistics. 1. Old browsers are likely unpatched browsers. With the vulnerabilities and security issues today, compatibility with AJAX is the least of their problems. Upgrade! 2. Mobile browsers have problems with MOST page content. Websites are designed for a minimum of 800x600 these days, if not 1024 wide. Websites still need to provide special pages to serve up content to mobile devices anyway.

      So, I know this is a spoof article by the author about a previous article about Frames back in the 90's... but I think he sticks too much to the premise that existed back then, that the web was all about simple content and "pages", without recognizing that the information complexity has evolved, and that "applications" are becoming more and more necessary for usability of the information. Yes, improvements are needed. Yes, back button support should be support (but not required). Also as was said in an earlier post, many of the problems are not an issue with just AJAX, and many are an issue with the lack of understanding of the effects of the choices made when using ANY new technology.

      -Alex

    5. Re:as in all new directions... by Iriel · · Score: 3, Insightful

      I think the major point of the article is that AJAX is currently being used (like a lot of upstart web technologies) in many places were it just confuses things more than needed. Give it time, and people will stop using it just for the sake of jumping on the new craze bandwagon and we'll find out where it shines and where it should never go.

      Personally, I think it's great for UI tricks and acynchronous form actions (checking for currently used user names, submitting to a shoutbox, and so on). If people think AJAX itself is bad, they should see the comments on Digg to AJAX articles. There are more comments like "If I see one more damn article on this..." than there are dupe notification comments here on Slashdot!

      I think this new use of JavaScript has great potential, but the real message of the article can be gleaned in the first few paragraphs: Don't go overkill.

      --
      Perfecting Discordia
      www.stevenvansickle.com
    6. Re:as in all new directions... by masklinn · · Score: 3, Informative

      HTTP is not a stateful protocol -- ok

      HTTP is not a connected protocol -- ok

      HTTP is not a client-server protocol -- WTF? What are you smoking here? Of course HTTP is a client-server protocol

      --
      "The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
    7. Re:as in all new directions... by Haeleth · · Score: 3, Informative

      They've introduced some new editors recently that just aren't very good

      Um, dude, this story was posted by CowboyNeal... I'm reasonably certain he's not new here.

    8. Re:as in all new directions... by amitola · · Score: 3, Informative

      HTTP is not a stateful protocol -- sort of, if all you know is RFC 2616. But if you're using any kind of language to create dynamic content on the server, the first thing that happens is almost always to set a session cookie for purposes of maintaining state.

      HTTP is not a connected protocol -- sort of, unless you count persistent connections which have been allowed since RFC 2068 (HTTP 1.1). And now XmlHttpRequest muddies that question even more.

      This isn't the Constitution we're talking about; I don't know why people bother to argue from "first principles" such as "HTTP is not stateful." There's nothing morally superior about a stateless protocol. The protocol has changed over time. There's no point pretending it hasn't.

  2. Misleading by FortKnox · · Score: 4, Insightful

    The article is about using AJAX on a webpage, but the biggest use of AJAX is on a web application.

    Sure, putting ajax on the companies webpage may not be the best idea, but how often are you using bookmarks on gmail (a web application)? And if you want to print from gmail, it shouldn't be a print of the screen, but a specially built printable html page.

    I think the article writer was focusing mostly on webpages where AJAX is clearly geared towards the web application developer.

    --
    Good quote, too many chars. Seriously, the slashdot 120 char limit sucks!
    1. Re:Misleading by garcia · · Score: 4, Insightful

      The article is about using AJAX on a webpage, but the biggest use of AJAX is on a web application.

      Sure, putting ajax on the companies webpage may not be the best idea, but how often are you using bookmarks on gmail (a web application)? And if you want to print from gmail, it shouldn't be a print of the screen, but a specially built printable html page.


      I think that pointing these things out NOW is a great idea being that AJAX is now one of the biggest buzzwords in the industry. With marketing and management raving about AJAX and demanding AJAX applications be put everywhere including locations they shouldn't be, I think it's about time someone put an article out there that describes the negative effect that AJAX applications could have on the web.

      Hopefully more media outlets will start picking this up and not just touting the successes of AJAX. Remember, buzzwords = $$$ in the eyes of those that are clueless.

    2. Re:Misleading by owlstead · · Score: 4, Informative

      "And if you want to print from gmail, it shouldn't be a print of the screen, but a specially built printable html page."

      Funny you should say that, because the W3G specifically designed HTML so that it could be read from screen as well as printed on a printer (and other media like screen readers etc.). Same with CSS really. The whole idea that you should generate a special HTML page goes straight against this policy. I blame the current browsers for not doing a well enough job on printing HTML pages. If they had strictly sticked to HTML standards and recommendations for this, this should not have happened.

      As for AJAX: the page *should* be printable as well. Just use the latest DOM and follow CSS guidelines and you should be OK. *IF* both sides implement HTML standards the way they are meant to be. Currently this only works well if you are an inhabitant of Utopia.

    3. Re:Misleading by FortKnox · · Score: 3, Informative

      I'm not suggesting that you can't print a gmail page, but I'm suggeting that if you want to print an email, you'd want to remove extra data that doesn't need to be on the page.
      In other words, I want the email header along with the subject and body. No need to have my folder information and how many new messages on the printout.

      --
      Good quote, too many chars. Seriously, the slashdot 120 char limit sucks!
    4. Re:Misleading by RustyTaco · · Score: 4, Informative

      It's called a print stylesheet, they're usually populated with things like #sidebar { display:none; } so that the exact same page looks right when printed.

  3. Implementation by kevin_conaway · · Score: 5, Insightful

    Its not the technology, its the implementation that causes those errors. You can misuse ANY technology to f things up. Why should this be any different?

    1. Re:Implementation by Anonymous Coward · · Score: 5, Funny

      You can misuse ANY technology to f things up.

      This is the Internet. You can say "fuck" here.

    2. Re:Implementation by ThinWhiteDuke · · Score: 4, Funny

      This is the Internet. You can say "fuck" here.

      Yeah. Especially when responding to an article headlined "AJAX sucks..."

      --

      It would be nice to be sure of anything the way some people are of everything.
    3. Re:Implementation by Arandir · · Score: 3, Funny

      You can also say "flbgrtyu", but why would you want to?

      --
      A Government Is a Body of People, Usually Notably Ungoverned
  4. I wouldn't go that far by reverend_rodger · · Score: 3, Funny

    I wouldn't necessarily say AJAX sucks, but I've foudn that Tide does, indeed, do a better job...

  5. I pull out the marshmallows..... by Anonymous Coward · · Score: 3, Funny

    ...to cook them via the upcoming flame war.

  6. ajax by rayzap · · Score: 5, Insightful

    ROTFLMAO AJAX is no different than any other programming set of tools. If used correctly it rocks, otherwise it sucks. We use it a lot in our web application and it has provided us the ability to deliver greatly enhanced interactivity and reporting. It's kinda like the blind date that gets overly hyped. The reality will never match the hype even if she was pretty.

  7. It's a spoof by Sugarcrook · · Score: 3, Interesting

    If you read the bottom of the article, you'll notice that it's a spoof and a simple rewrite about why frame suck most of the time.

    1. Re:It's a spoof by smittyoneeach · · Score: 4, Funny

      To paraphrase Karl Marx: History repeats itself, first as tragedy, second as XML.

      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    2. Re:It's a spoof by ivan256 · · Score: 4, Insightful

      For what it's worth, the original was completely correct, and frames (mostly) died a quick death. Almost nobody uses them in new development anymore.

    3. Re:It's a spoof by DingerX · · Score: 4, Insightful

      aye, and frames do suck most of the time, for the reasons specified. I am continually annoyed by those things. So I assume we're supposed to sit back and chuckle that "them naysayers are just like the luddites who said frames were bad". Frames still stuck, most of the time, even with a decade of workarounds to fix the broken functionality.

  8. Microsoft? by takkaria · · Score: 4, Interesting

    "... offers a critical view at the new Microsoft technology ..."

    It doesn't appear to be new, and it doesn't appear to be Microsoft's anymore, either.

    1. Re:Microsoft? by amliebsch · · Score: 5, Informative
      And it most certainly is NOT and NEVER WAS a Microsoft technology. Microsoft has nothing to do with the new widespread adoption of AJAX. This comment in the article really really bothers me. Microsoft deserves absolutely no credit for things they had nothing to do with.

      Correct me if I'm wrong, but didn't Microsoft invent XMLHttpRequest? In which case, most AJAX, which uses XMLHttpRequest, is in fact built on Microsoft technology, and they deserve credit for having a played key role.

      --
      If you don't know where you are going, you will wind up somewhere else.
    2. Re:Microsoft? by clear_thought_05 · · Score: 5, Informative
      You are correct. It was first Microsoft's idea.

      Microsoft first implemented the XMLHttpRequest object in Internet Explorer 5 for Windows as an ActiveX object. Engineers on the Mozilla project implemented a compatible native version for Mozilla 1.0 (and Netscape 7). Apple has done the same starting with Safari 1.2.


      http://developer.apple.com/internet/webcontent/xml httpreq.html
  9. Not always that bad. by MartinG · · Score: 5, Insightful

    The web is used (rightly or wrongly) to deliver two distinct things.

    1) Content.

    2) Applications.

    For (1) ajax _does_ suck most of the time for all the reasons stated, but for (2) is makes sense because it makes the app behave more like a desktop app. "back" and "bookmarks" stop making sense anyway. You wouldn't expect to have those features in your desktop apps, so why in an app delivered over the web.

    The great shame is that these two opposing requirements have not forked into the data-web and the application-web. Things went wrong IMO the day someone thought of putting forms in html.

    --
    -- MartinG To mail me: echo kewyjlcxyzvjfxbqwh | tr bcefhjklqvwxyz .@adgimnoprstu
    1. Re:Not always that bad. by electroniceric · · Score: 4, Interesting

      I'd mod you up, but I prefer to reply instead. This is very insightful statement, and I believe it's the basis of Jakob Nielsen's complaint. Web-as-content really is distinct from web-as-application. The web browser works beautifully for web-as-content, but is rather limited for web-as-application.

      Now it happens that a web browser also has two excellent characteristics as a application deployment platform. One is that it is pre-installed nearly everywhere, so as long as you can get a coherent set of standards for what it provides and how it works, it's an outstanding application deployer. It basically enforces separation of UI from logic. The second is that the web was built on an asynchronous protocol, which builds in excellent network resilience. Applications that go over a public network like the Internet must fundamentally assume that the network is of variable and unknown quality, and work gracefully in those scenarios.

      AJAX is basically a hack to get the content-oriented browser to work like a proper GUI toolkit. Why should a developer work with the document (note content orientation) object model, when every sane GUI toolkit builds on windows, widgets and event listeners? AJAX is necessary largely because of MS' squashing of Java as a viable network application platform, and because the Java-makers (i.e. Sun) have never prioritized geting a really performant, usable UI toolkit for Java into widespread use. In short, what you really want to build internet apps is a sandboxed deployment environment you know will be on every machine, and that defaults to asynchronous communication for network use. AJAX basically gets you there, but it ain't pretty. My hope is that once people get used to using Internet apps there will be momentum for getting that kind deployment environment on every machine.

      PS: I know Javaheads are going to flame me for that one, but compare the comfort of using your average Java app to anything written in QT/KDE,GTK, MFC,.NET, etc. Why the hell is Swing only starting to work at the level that an app like Eclipse does, when QT widgets have worked smoothly and quickly?

  10. Flash by nmg196 · · Score: 5, Insightful

    Nearly all of the problems cited in the article are present to a FAR WORSE extent with fewer workarounds if you write your website so it makes heavy use of Macromedia Flash. That includes problems with bookmarking, back button not working, no printing etc. Yet Flash is used on millions of major websites. As other posters mention, the problem is not with the technology but misuse of the technology.

    Some flash developers get what I call "flash happy" and write the entire website in flash. This is lunacy. For a start, (and this is possibly a problem with AJAX heavy sites too) your site cannot be indexed by any search engines if it's navigation is entirely flash based. No search engine in the world is going to evaluate your flash files or run your AJAX scripts in order to attempt to crawl the site. If AJAX is used sparingly where necessary, then I'm pretty sure it won't cause any major problems. It's not like Flash seems to have suffered...

    1. Re:Flash by brassmoknets · · Score: 4, Insightful
      No search engine in the world is going to evaluate your flash files
      http://www.google.com/search?hl=en&lr=&safe=off&q= filetype%3Aswf+contrary+evidence
      Except perhaps...er... what was the name of that search engine...you know...er...
  11. Umm... Its a SPOOF by dsginter · · Score: 5, Informative

    Read the bottom of the page. The article is a spoof.

    --
    More
  12. Re:Jokes often become "common knowledge" by killercoder · · Score: 5, Informative

    Ummmmm, I hate to do this - god I hate to do this, but I'm actually going to support MS on this one.

    The paradigm of Ajax: "The transfer of XML to a web page in the background so that javascript can load data/initiate actions without loading a new page" was in fact a Microsoft innovation. They shipped it with Internet Explorer 4 and the first packaged MSXML controls.

    I was writing applications of this type over 7 years ago targeted at Internet Explorer 4. The latest incarnation of AJAX still uses the MSXML parser on IE Browsers, but extends the support to FireFox and Netscape variants.

    Please note, Microsoft did not coin the term AJAX, but they did do it first.

    I know I'm going to hell for this.

  13. When is a spoof not a spoof? by DragonHawk · · Score: 3, Insightful

    "If you read the bottom of the article, you'll notice that it's a spoof and a simple rewrite about why frame suck most of the time."

    It's interesting to note that while the article is apparently a spoof, many of the objections still apply. (Sure, this is way over-generallzing, but work with me here for a minute.) Also, note how frames went through a period where everybody used them, then use gradually taper off. I think people realized that much of the time, frames just got in the way and the "old ways" worked just as well, if not better.

    It does seem like the computer world loves to make the same mistakes over and over and over and over again. We keep doing it. (ObRef to The Mythical Man-Month by Fred Brooks.) What's that about not learning history?

    --

    dragonhawk@iname.microsoft.com
    I do not like Microsoft. Remove them from my email address.
  14. The wiki is wrong - history lesson by brunes69 · · Score: 5, Informative

    AJAX relies on the XMLHttpRequest object to do anything. Without it, there is no AJAX (you could say it puts the A in AJAX). Microsoft invented this object, it has shipped with the MSXML COM object for a long time. They first used it in Outlook Web Access in the late 90s.

    AJAX only started to get popular in the media after Adaptive Path coined a stupid buzzword for it, but IE-specific developers had been using it for years. Adaptive Path just stumbled upon it being more sueful because Firefox started also shipping an XMLHttpRequest object.

    But Microsoft *did* create it, so it is totally accurate to call it a "Microsoft Technology". Just like SMB networking is a "Microsoft technology", even though there is Samba, and .Net is a "Microsoft Technology", even though there is Mono.

  15. AJAX is far behind what Microsoft created by davegust · · Score: 4, Interesting

    Correct me if I'm wrong, but didn't Microsoft invent XMLHttpRequest? In which case, most AJAX, which uses XMLHttpRequest, is in fact built on Microsoft technology, and they deserve credit for having a played key role.

    You are absolutely correct. In fact, Microsoft 5 years ago went far beyond what AJAX is today. The XMLHttpRequest object can act as a data source for binding directly to the IE DOM controls - without scripting to parse the data. I created an statewide budgeting app based on this technology 5 years ago for the Idaho Division of Financial Management. It allows a collaboration app like experience with reduced deployment effort. An ideal IT solution.

  16. All of this can be solved by alphorn · · Score: 5, Insightful
    The problems mentioned can all be avoided.

    • The back button can be made to work. We went to great lengths to make sure the back button takes you to the previous view in http://map.search.ch/ . Try clicking it for a zoom, then hit the back button.
    • The fact that URLs don't auto-update doesn't mean that permalinks are impossible. We create a permalink every time you do a search or enter the "email this page" screen. See http://map.search.ch/zurich
    • Even auto-updating URLs when navigating inside an AJAX app are possible, we have plans to implement that in the future.
    • And of course, our map works just fine without javascript. http://map.search.ch/?s=1

    And yes, we've had all of this from day one - months before google maps. Admitted, many AJAX apps still dont bother to do any of this - I'd say let's adress that instead of abandoning AJAX.
  17. Re:Please not again! by serutan · · Score: 3, Interesting

    I agree 100% with the above post, because PromptZero cut and pasted most of it from one of my recent posts on this subject. I guess imitation is flattery.

    The article makes some valid points about the Back button and Bookmarks, but these are problems that can be solved pretty easily. Microsoft no doubt would have solved them several years ago, had they seen the potential of the off-channel request technique and acted on it. But as one MS manager told me shortly before IE was released, with Netscape pretty much dead by that time they saw no point in developing IE any further. See how market dominance encourages innovation? I think Firefox now has native support for off-channel httprequests, whereas IE is still using an ActiveX control.

  18. Re:Yeah, NOBODY! by guet · · Score: 4, Interesting

    Get a clue. Just because you can't see frames, does not mean they are not there. Frames are used all over the freaking place. Nearly every web page you visit has an ad in an iframe in it.
    This is the reason that this article, and also the one it spoofed, are both wrong. Not every state of a web page has to be, or should be, bookmarkable. The back button was never meant to be an 'undo' and should not be treated as such. etc etc...
    Both frames and Ajax are very useful and powerful in web applications.


    1> There's no need to be so obnoxious - an iframe is not a frame, and the original article was talking about frames, which did break the web and were a Bad Thing.
    2> The back button should be usable to navigate from resource to resource. Each URL should identify a resource, and each unique resource (message,post,whatever) should have an URL.

    Sometimes web apps break this rule, and when they do, it can be bad. Obviously state shouldn't be bookmarkable, but resources should be. Ever tried to give someone a link to a product on the Apple store? Applications which misuse AJAX can have this problem if they use it exclusively and don't change the url, or worse put some garbage to do with THEIR session info in the url which is shown to the user. Gmail gets away with it because you mail is private and you don't need to send links, with google maps it's kind of annoying because you have to click the 'link to this page 'kludge to send the map to someone else, and you can't click back through various locations easily.

    Not that I'd agree that AJAX sucks most of the time, it doesn't at all, can't work out why everyone is getting so worked up about a small part of the toolset.

  19. Firefox 1.5 is 1st browser with AJAX accessibility by R4modulator · · Score: 4, Interesting

    We can't ignore the fact that the exciting part of the web is moving away from documents and into applications.

    It's possible to make DHTML/AJAX/Javascript applications act like desktop applications with respect to keyboard navigation (on IE and Firefox) and support for accessibility tools (currently Firefox only). This was part of the accessibility code that IBM contributed to Firefox.

    Information and examples here:
    http://www.mozilla.org/access/dhtml/

    W3C roadmap for the developing standard here:
    http://www.w3.org/WAI/PF/roadmap/DHTMLRoadmap11050 5.html