Wait till I come! » Blog Archive » Oh look, using Ajax in a stupid way is not a good idea?
Random notes by Chris Heilmann

Oh look, using Ajax in a stupid way is not a good idea?

It is quite fascinating to me that the newest article on dev.opera.com entitled ‘Stop using Ajax!’ is such a big thing right now. Tweets, shared bookmarks and Google Reader items are pouring in and people seem to consider it an amazingly daring article.

Here’s the truth: James is right. He also was right when he more or less gave the same information as a talk at Highland Fling last year following my presentation on progressive enhancement and JavaScript.

However, there is nothing shocking or daring or new about this. All he says is:

  • Don’t use any technology for the sake of using it
  • Consider the users you want to reach before using a technology that may not be appropriate
  • Make sure your solution is usable and accessible
  • Build your solution on stuff that works, then enhance it.

This is what I consider to be a normal practice when developing any software or web solution.

However, the real question is now why we are at this state – how come that we see this information as daring, shocking or controversial, and how come a lot of comments are still “I don’t care about accessibility because it is not needed for my users”? How come the assumptions and plain accessibility lies are prevailing while the good stuff remains unheard of?

Well, the truth is that we have been preaching far too long to the choir. I’ve been in the web accessibility and standards preaching community for a long time and whenever I asked what about enterprise development and CMS I was told that it is not worth fighting that fight as “We will never reach them”. Well, this is where the money and a lot of jobs are and it is a fact that both accessibility and standards activists in a lot of instances don’t even know the issues that keep the stakeholders in these areas busy. My Digital Web Article ‘10 reasons why clients don’t care about accessibility’ and the follow-up Seven Accessibility Mistakes Part One and Part 2 listed these issues and the wrong ways of how we try to tackle them 3 years ago. My talk at the AbilityNet conference last week Fencing-in the habitat also mentioned this attitude and problems.

Here’s where I am now: I am bored and tired of people fighting the good fight by blaming each other’s mistakes or pointing out problems on systems that are within reach. When people ask for accessibility or Ajax usability advice you’ll get a lot of bashing and “go validate then come back” answers but not much information that can be used immediately or even questions that ask what lead to the state of the product. You’d be surprised what you can find out by asking this simple question.

We have to understand that large systems, frameworks and companies do still run the show, even when we think that bloggers, books on webdesign and mashups push the envelope. They do, but so far they are a minor discomfort for companies that sell Ajax and other out-of-the-box solutions that are inaccessible and to larger parts unusable for humans. When was the last time you used a clever expense or time tracking system in companies that are not a startup or a small web agency? When I was at the AjaxWorld conference in NYC earlier this year I heard a lot about security, ease of deployment and scalability but only a little bit about accessibility (the Dojo talk and the YUI talk, actually). People are a lot more concerned about the cost of software and the speed of release than about the quality or maintainability. It is cheaper to buy a new system every few years than to build one that is properly tested and works for all users. Does your company still have systems or third party solutions that only work on IE/Windows? I am sure there is at least one, ask the HR or finance department.

It doesn’t help to coin another term and call an accessible and usable Ajax solution Hijax, either. As much as I like the idea of it I have to agree with James’ comment – we don’t need another word, we need a reason for people to not just use things out of the box without thinking about them or – even better – offer help to the companies that build the solutions on assumptions in the first place. When I ranted about a system by a large corporation some weeks ago on twitter their marketing manager for EMEA starting following me and I am starting some talks with them.

I have heard numerous times that my ideas about progressive enhancement and accessibility are just a “passing fad” and “that in the real software market you don’t have time for that”. Challenging this attitude is what makes a difference – by proving that by using the technologies we are given in a predictable and secure way does save you time and money. However, there are not many case studies on that…

I cannot change the world when I don’t know what obstacles people have to remove to do the right thing. Deep down every developer wants to do things right, in a clean and maintainable fashion and be proud of what they’ve done. Bad products happen because of rushed projects, bad management and developers getting so frustrated that they are OK with releasing sub-par just to get the money or finally get allocated to a different project.

This is the battle we need to fight – where do these problems come from? Not what technology to avoid. You can use any technology in a good way, you just need to be able to sell it past the hype and the assumption that software is developed as fast as it takes to write a cool press release about it.

Technorati Tags: , , , , , , , ,

11 Responses to “Oh look, using Ajax in a stupid way is not a good idea?”

  1. Isaac Z. Schlueter Says:

    The simple fact is, fair or not, if accessibility is not enough of a concern for a business, if it doesn’t impact their bottom line to do it, and it costs money, then they won’t (and shouldn’t!) do it. If they’re wrong, the market will punish them, and they’ll learn or be outpaced by competitors.

    The fact is, it does impact their bottom line positively to get accessibility right. Progressive enhancement, even if you do use ajax, results in a more stable product that is more easily extensible. That means less time repairing bugs and more time adding value. And that is the message we should be sending to non-technical stakeholders.

    For Flickr, yes, it’s not as accessible to assistive devices as a single big form would be. But form-based page-refreshing photo sharing sites were around way before Flickr, and never caused the stir that Flickr did. Accessibility is just one piece of the puzzle. Their “inaccessible” interface is more accessible, and more enjoyable to a huge percentage of people. If they do what they can to make that experience accessible to assistive devices, then that’s a bigger market they can hit. If they can’t, then so be it, that’s a loss that they have to weigh against the value of the “cool” interface to their other users.

    This is economics. Numbers matter. The “don’t use ajax” argument reminds me of those who, completely misunderstanding the laws of supply and demand, bemoan the fact that a basketball player makes so much more than a teacher. Good teachers should perhaps make more than they do, but how many teachers are there, and how many NBA players? How many people’s lives does the teacher add value to in a year, and how many NBA fans gain enjoyment from watching games? The teacher’s effect may be deeper, but economics care about breadth as well.

  2. Simon Wheatley Says:

    So the echosphere, sorry, technoblogosphere, shouting FAIL at everything doesn't work? I guess that leaves up with (as you are and do): know your craft; strike up the relationships; present the arguments. A rather longer process than the majority of us have been prepared to stomache to date.

  3. Gareth Rushgrove Says:

    I agree it's easy for us as savvy developers to get caught in our own coat tails. In terms of what we can do to improve the situation though; education, project management, infiltration.

    The more good practice taught to those entering the industry the better. It's not the perfect solution as graduates don't have that much power generally - but if they understand the problems they will make the right decisions when they can.

    Some of us are going to become Project managers, product managers or just generally managers depending on our companies. We'll need to learn politics and better communication skills (a good thing). As long as we don't lose the passion and remember why we got their these people have the potential again to make incremental improvements.

    We could sacrifice ourselves and infiltrate CMS vendors, AJAX solution providers and either change their ways with good arguments and demonstrations of skill, or alternatively bring them down from the inside.

    One of these might be dubious and unlikely. I think the other two are a mark of a community growing up (hopefully).

  4. Dan Shields Says:

    This was the best article I have read in a while. It hits home in so many ways for me. I am a front-end developer that works for an ecommerce company and from day 1 I really wanted to get in there and make our product the way it should be. That didn't happen as I would of liked, because the platform we are on is already a huge mess and the business executives and owners of course want all the new shiny things they see on other sites and we all know how cluttered up other ecommerce sites are with tons of javascript and what not.

    I try to do my best with my code but a lot of the times I can't fight the battle of making something accessible, I mean users on our sites can't even checkout out without the use of Javascript. A lot of it also has to do with Google Analytics, the reason users need Javascript to checkout is because of the weird stuff we have to do with GA and our multiple domain issues. I'm sure there is some way to work around it but when talking to other engineers they don't want to spend the time to figure it out. Now with all the Ajax add to cart and overlays everything on our site has Javascript tied to it.

    I feel like we would have to start all over to actually create the application in an accessible way. It probably sounds like I'm blaming other people or maybe I'm not the best developer to create accessible unobtrusive javascript in the timeframe I am given for projects, but I have become a beaten man in terms of trying to fight the battle of accessibility.

    I would love to see an example of a great ecommerce application that has lots of Javascript and is 100% unobtrusive and accessible. I think if there were a few great examples of enterprise applications that did focus on Accessibility then possibly more business owners and executives would see the benefits of it.

  5. ppk Says:

    What's the fundamental problem? Software developers refuse to see front-end programming as a separate discipline.

    All other problems you (and others) mention are just refinements on that central theme. What we say doesn't count because we do web development instead of software development, and somehow that's "less".

    The next step the web standards revolution has to take is quietly, patiently positioning front-end programming as a separate technical discipline that other disciplines have to argue and compromise with; instead of just being the guys who do colours and graphics and Ajax and such.

  6. Chris Says:

    @ppk yes and no. Ajax is a job that needs to be done by both backend and frontend engineers - especially when you want to keep it to the bare minimum and accessible.

    But I hear you loud and clear on the emancipation of web development as a full-budget skill in IT, which is why I am happy to come to your conference :)

  7. Rimantas Says:

    I'd like to ask - how accessible are desktop applications compared to typical web application?
    And how come we require web applications to have the same level of accessibility as plain static web content has, but forget desktop application completely.
    Is that fair? How does progressive enhancement work in those?
    Web used to be the place of mostly content. Now it is becoming the platform for web apps.
    Sorry to tell you, but not all apps can work on plain html and back-end scripting. Some can, but their usability will be to low for them to be useful.
    Too many shouting "web is not print!". but same people sometimes forget that "application is not a web page".

  8. Chris Says:

    @rimantas totally agreed. The problem of inaccessible apps is that we try to make them work with these technologies. This is where richer application frameworks come in - Flex/Flash/Air or Silverlight. These have more low-level access to the operating system and can thus piggyback on the accessibility channels these provide for their native interfaces. If you build those right.

  9. Liccy Says:

    Is no more easy adapt all this readers and Web-accessibility tool to the new technology ... ???

    I really can't see the web without Ajax, Comet or any kind of real-time application.

    As Christ say... "Consider the users you want to reach before using a technology that may not be appropriate" that all what is about....

    And anyway. there are so many way to get around the Ajax issue... well... except for the post-back one... even is nothing to do with accessibility... but i guess that should be in other topic...

  10. Steve Buell Says:

    Great article. I empathize with you whole heartedly.
    Two points though;
    1) I'd love to send this to my CIO, but the title might be a little "off putting". He's cool but his subordinates may be a little pissed.
    2) "I don’t care about accessibility because it is not needed for my users”.
    I love hearing this line.
    My usual response goes something like this: "If the wrong thing happened to you today, tomorrow you could need accessible design to do your job".
    I follow with real examples that we have had to accommodate
    That one is greeted with stunned silence.

    Never lose faith,
    Steve.

  11. FataL Says:

    The problem that people started naming practically any enriched web-page as web application... And many thinks if it's a web app than just forget about accessibility.
    Is a flight ticket reservation to be considered a web-application? No!
    Is Google Docs a web application? Yes.
    Is rich text editor for forum reply a web application? No!

Leave a Reply