An Ajax Reality Worth Worrying About
An anonymous reader writes "This article discusses the hype that currently surrounds Ajax and it's shortcomings. Reliable Ajax frameworks are still under construction, and you should worry about navigation history, bookmarkability, feedback, persistence, concurrency, and security. This article will help you avoid the major problems inherent in Ajax development."
One thing I wish more webmasters would use on sites with AJAX and other technologies is sessions. When I hit "Back" in my browser, I want it to actually go back... not crap out and dump me completely out.
I know... I know, I should be using whatever function is built into their website. But, I'm sorry, clicking Back or hitting backspace is just such a habit, its really a deal breaker for me...
I have no idea how much time I've wasted refilling in forms on my bank's website because it cant figure out what I'm doing when I press back!
You can blame the HTTP Post mechanism for this. Do you want your confidential details appearing in a URL? No? Then you can't use GET, you have to use POST. And what does the POST spec say? Responses to this method are not cacheable. Not that this would work anyway; consider this, when you click back, is the old data still current? If you've just transferred money out of your account, then definitely not. The only way to ensure that customers don't see incorrect figures (which would draw too many complaints and possibly lawsuits) is to make the posts expire.
I'm sorry, but something better than HTTP/POST/HTML and a web browser is required to solve this problem. Perhaps some sort of interactive web site client which is designed from the ground up to support applications and not just static pages like was the original intent with web browsers.
The problems that come with new frameworks, new technologies and mostly new trends usually lies amon the purpose for implementation. Using ajax just for the sake of using it is not the issue. Of course emerging technologies have their maturation process. Criticizing a technology usually helps in the development if the criticism has specific issues that must be resolved.
-My 2 cents.
"Will the highways on the Internet become more few?" -George W. Bush
...but I can't take anything from IBM on web design seriously when their article renders in a tiny little font. If that wasn't enough, they actually go to the trouble to create and apparently use acronyms for "Tipping Point" and "Paradigm Shift". Great, now we get acronyms for buzzwords in a technical article? They're specifying font sizes in pixels, too. Shame on them.
"You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
Just finished implementing an ajax drag and drop shopping cart.
Check it out here: http://www.merchdirect.net
Perhaps because real Ajax developers are getting stuff done and not wasting time on slashdot...
The real problem with Ajax isn't java script or browser fickleness, or Microsofts hatred of standards, it is that we are trying to solve one a problem, distributed applications over the internet, within the wrong framework, a document viewer with scripting capabilities. What we really need is an internet application browser, that is desgined to be able to host such applications, render consistantly over multiple platforms, be stable and secure, ect. Then users wouldn't be confused concerning the behavior of the back button for example, because no one expects applications to have a back. It might make sense to have the broweser be able to launch the application viewer when needed, but more than that is just begging for problems.
Philosophy.
Morfik http://www.morfik.com/ has already worked on these issues and deal with them so you don't have to lift a finger when you build your application. Atlas is (reportedly) going to (eventually) make all of these issues go away as well. Since Atlas isn't handling these issues yet I can't comment on how elegant it is, but Morfik is unbelievable. States are just handled. Bookmarks, back, forward, and reload buttons are no longer an issue. What's even cooler about Atlas and Morfik is that they are RAD IDE's with built-in everything that you need. Obviously Atlas is an all Microsoft tool, but Morfik integrates the more /.-friendly Apache and Firebird servers, which also means that in theory you shouldn't be burdened with a higher deployment cost. How they're going to handle patches to those products as new versions come out hasn't been determined, AFAIK.
Both make the transition to AJAX development even easier since the code-portion of your application is built in a high-level language you are already familiar with, whether or not you do web-development for a living already.
It's so cool to live in interesting times!
Friends help you move. Real friends help you move bodies.
Never forget: 2 + 2 = 5 for extremely large values of 2.
I have been always worried about Ajax' impacts on current web analytics software (e.g. AwStats, WebTrends, Google Analytics?, etc., almost all of them are page or logfile based). How will they be able to track Ajax applications if there is no new page loads, tags?
What I would really like to see is something like flashblock for ajax. It's that kind of popular, closed-source web design that makes so many pages load slowly and suffer from crippling design and compatibility issues. When people who aren't skilled in using the standard or the principles of web design, you end up with a crappy page with all the shiny new features like java and popups and frames. Well, those are not so common now thankfully, but they were at one point until people got tired of them. Now the major issues are things like websites only in flash and those that only really function with IE. All I can say is I'm waiting for an open standard that improves on these issues through commmunity scrutiny. It's unlikely to ever happen, but I'll keep crossing my fingers.
Ajax is wonderful, but it's not necessarily secure out of the box. I wrote about this back in February:
Ajax security presentation for OWASP
http://www.greebo.net/?page_id=329
Just because Ajax is being used should you abandon years of security knowledge.
Andrew van der Stock
Wow... The morfik home page doesn't render AT ALL in Safari... Great compatibility there!
That's exactly what Java applets do. If you want to run an application in the browser, that's the appropriate mechanism.
I feel the same about AJAX! :) It may have improved the user interface and the browsing experience a lot, but AJAX pages eat up so much memory! Maybe its an issue with the browser implementation, but it does drag the system's responsiveness down. One should really think about it before one decides to go for AJAX.
I was working on developing a web interface for an embedded device. You just had to configure a few parameters; but people wanted AJAX!
So... how's the astroturfing business?
Can this be true - you can program in a high-level language like C# for the browser?!!! I have downloaded it and will let you know.
Funny, but I hit the back button in Konqueror all the time and it does exactly what I want, both when browsing the web or my local files.
Well, you can (with ASP.NET), but it's an awfully long-winded method for generating bloated HTML pages which don't work without JavaScript. Try Front Page, or save a Word doc as HTML; either is a much quicker way of generating shoddy code ;-)
Using HTML in email is like putting sound effects on your phone calls. Just say <strong>no</strong>.
Tell that to Rincewind.
I believe there is a compatibility issue in Safari. Of course it's also only in an EARLY beta. I don't remember about Opera.
Friends help you move. Real friends help you move bodies.
Never forget: 2 + 2 = 5 for extremely large values of 2.
Allow me to play devil's advocate for a moment here...
Let's not also forget accessibility and backward compatibility. Neither of which you have if your site heavily relies on Ajax. Ajax is fun and all, but if you build a site or application that relies on Ajax (as so many do these days), you're completely leaving behind those with disability that prevents them from using a graphical browser and those who can't or won't use the latest versions of IE, Firefox, or Safari. (Let's at least be honest for a moment and admit that those are the only three browsers that Ajax authors ever attempt to target and even throwing Safari in there is a bit of a stretch.)
For awhile there, we were making good progress toward better adherence to web standards. Now it seems like "oooh shiny!" is rapidly taking over web design again.
Of course it's possible to build a site or application that is backwards compatible and accessible and thus uses Ajax only as a enhancement. But if the site works just fine without Ajax, why would you waste time implementing a few extra Ajax features just for show?
Reliable Ajax frameworks are still under construction, and you should worry about navigation history, bookmarkability, feedback, persistence, concurrency, and security.
Stop the presses! Someone has discovered that AJAX applications should follow the same usability guidelines that have been researched, reported, and [often to a lesser extent] used in all other applications.
XULRunner is the answer.
Most of your comments are right on the money - if you are building a site that relies on AJAX, you are building incompatibility into the site (for now).
However, I must take exception with your last statement. Just because a site "works fine" without AJAX doesn't mean that it is a waste of time to add it. I developed a live search page recently that has users raving about how useful it is. This page was a static enter-your-criteria-and-hit-search page until recentl, which was fine, but it now allows you to return results while you are selecting criteria, which has an immense usability benefit when trying to sift through thousands of search results. Thus, it looks cool AND works great - not "just for show." Of course, the page still works "just fine" if the necessary AJAX components (Javascript, et al) are not present.
Overall, however, you are right. AJAX is simply another technology that should be used as it is appropriate as a solution to a problem rather than for its own sake.
Take a look at the medical journal The Lancet. Its paper version is mailed all over the world and the publishers economise on mail costs by using small type on thin, high quality paper. Obviously one uses abbreviations to avoid wasting paper and incurring avoidable transport costs.
What are abbreviations doing on web pages? Literate adults tend to recognise whole words or even whole phrases. Decoding the abbreviations slows us down. Sometimes we don't recognise the abbreviation, which brings us to a halt. Other times abbreviations clash. I frequently get slowed down by CVS. How did a mention of the Concurrent Version System get into my non-geek mailing list. Oh! It is the American pharmacy chain. There are not enough Three Letter Acronyms to go round.
Abbreviations are a total loss on webpages.
The issue is the credibility of a page on the topic of website design. It is easy enough to say that a web page is a bit like an ink on paper page and to translate print layout ideas to the web by analogy. So there is no need to read other persons vague analogies.
The reason for reading somebody else's views on website design is the hope that they might have attempted to do the hard stuff, responding to the web as something new and thinking the principles of layout through from first principles. An obvious first principle is that font sizes should be set at the browsers end of the link not the server. How else are you to cater for the varied needs of many different readers?
A writer on website design who fails this basic test cannot expect readers to go to the trouble of using ctrl+ to read his pathetic drivel.
Those very relevant AJAX problems boil down to two: state management and security (including state integrity/privacy). So state management is the #1 priority for making AJAX apps work. Client-side cookies are about to finally gain the recognition they deserve for their necessity in handling those factors.
--
make install -not war
Okay half-day at it. The C# is a syntax implementation. Which is good enough for me. Also allows me to put projects together including a mix of other high-level languages - Java, Basic and Pascal. Now I wonder how Sun will look at this....having projects in Java for browser and server and no JVM.
If done badly, yes.
Anyone with any kind of disability has problems with it, ...
Are you aware of text image replacement? Those of us who use it understand well how to create sites accessible to people with disabilities. Your remark suggests otherwise.
Thanks for the news flash. We'll take it into consideration.
No, it is not.
"Our interests are to see if we can't scale it up to something more exciting," he said.