This article gives you a good understanding of the fundamental principles of Ajax and a nuts-and-bolts knowledge of the client and server side components that participate in an Ajax interaction. These are the building blocks of a Java-based Ajax Web application. In addition, you will be shown some of the high-level design issues that come with the Ajax approach.
This was indeed a good peice. Worth reading even if you are developing in other languages. The principles are the same.
Ajax can certainly help when building web applications as long as you don’t overuse it. It can easily make things more complicated than they should be.
Here’s a nice Ajax resource if you are interested in available solutions.
http://www.ajaxpatterns.org/
It was google who made AJAX popular first.
Their Google maps is an excellent example for an AJAX application.
AJAX was already very popular. There just wasn’t a fancy name for it until recently.
Google did start a hype though. And their applications are excellent examples of how to use the technology.
who invented XMLHttpRequest
Yeah, I was using it a few years back for some internal sites. Funny how you give something old some snazzy new buzzword name and everyone thinks it’s some great new technology. I think Google just did a good job of showing what it could be used for.
I think the problems with ajax early on, was being MS only. MS never really publicized it much though. Either that or everyone gets the Java(ECMA)script information from somewhere else. Everyone seems to ignore MS when they release new technologies, possibly because of all the accompanying hype.
Google is the first major site to use it that I know of. I think they can be credited with support being implemented in browsers like opera & safari. However the idea is definitely MS.
You are probably better off using a JS library to use it though. Prototype seems to be very good in this respect.
Wonderfully AJAX usage will be kept to a minimum. I’d hate to see even larger parts of the web requiring javascript support to display simple text.
So use it to add extra functionality. But don’t use it to restrict access to the information to only browsers that support javascript.
– Jesse McNelis
For some websites there’s no need for AJAX, e.g. simple text and links, but the web can’t wait around for dillo to catch up to the rest of the browsers.
Having done a fair bit of development work for corporate intranets, I’ve found that many companies (particularly large financial institutions) won’t allow client-side javascript or other scripting to be enabled on their desktops.
That’s not been a significant issue as I’ve not really come across situations where AJAX (or whatever you want to call it) has been essential.
Ive been using “ajax” on a site that im working on.
Bit harder to work with since most of the html is dynamic.
get / post ‘ing of html data with in html tags without updating the whole site.
XMLHttpRequest may have made it simpler. Google Maps may have made it popular. But Asynchronous Javascript calls existed and were used a long time before both of them. As for the XML part… not only is most of the times unneeded, but also many applications prefer to skip that bit for a (small) speed gain. But anyway, nice article as introduction to AJAX.
@jessta: “Wonderfully AJAX usage will be kept to a minimum.”
Or not. Of course you shouldn’t impose too much restrictions on your visitors if you have a public website and want it to be popular.
But if you can, you should use what is best for the experience. Take Google Maps, for example. Sure, you can have a reduced version for those who can use the full one, but the whole point of Google Maps is the interface (and arguably the published API they provide).
myself: …for those who can use the full one…
Of course I meant …for those who can’t use the full one… but my fingers have their own life and make their own decisions.
Google Maps also does something this article didn’t mention. It uses XSLT.
A client-side XML dataset that is transformed into HTML nodes is a very powerful concept. (Potential memory leaks aside).
For the laggards Google even implemented an XSLT Processor in Javascript! (Safari and Opera). And made it available:
http://sourceforge.net/projects/goog-ajaxslt/
Event code in Javascript, datasets in XML and displayed using XSLT. Thats the power of AJAX.
I hate those sites who require javascript,just another security hazzard.
I hate those sites who require javascript,just another security hazzard.
I hate those programs who require C, just another security hazaard.
I worry that we are quickly about-facing and running full pelt backwards to 2000 where pages had 50K of javascript added that had to use no end of javascript hacks to work in the clutch of browsers. The DOM is still far from reliable on all browsers, and what of text-mode browsers which don’t support JS?
I think it will be a sad day when we have gone the wrong direction and go back to sites that only work with javascript enabled. I’m fed up of 100K worth of rover scripts being added in by serverfarms so I always have JS disabled.
>> what of text-mode browsers which don’t support JS?
I think the whole point of Ajax is to give web developers a way to create desktop-like web apps (RIA). I hope there aren’t people out there expecting to run Google Maps in Lynx…
However, when using Ajax for “websites” (not applications), it should only be optional, so text-based browsers can still do a user registration, login, or whatever.
I worry that we are quickly about-facing and running full pelt backwards to 2000 where pages had 50K of javascript added
But this way you don’t have to load entire new pages from the server. For each request, only the relevant data is sent.
that had to use no end of javascript hacks to work in the clutch of browsers. The DOM is still far from reliable on all browsers, and what of text-mode browsers which don’t support JS?
Time for them to catch up, no?
Seriously, I wouldn’t recommed COPY CON [filename] for text-processing.
Javascript is a terrific technology which only needs a good standard IDE and more uniformisation. IOW, IE should in good measure deprecate its APIs and move closer to the Mozilla model.
Don’t give JS local IO access and it is relatively secure.
Modern browsers are deficient but gettting better.
> Time for them to catch up, no?
Unfortunately, not everyone has the luxury of ignoring older browsers. My department still supports Netscape 4.7 and AJAX doesn’t support these old browsers.
Also, keep in mind that due to accessibility issue, the blind tend to rely on text-only interfaces. So if your company mandated by law to be accessible, Lynx support is important. It’s also important if you need to support Blackberry’s crippled HTML.
Unfortunately, not everyone has the luxury of ignoring older browsers. My department still supports Netscape 4.7 and AJAX doesn’t support these old browsers.
Yes, that may be an issue. But really, NS4.7 was short-lived (apart from the fact that that’s what I used from 97? to 2001, when Mozilla became usable), so why not move on to Mozilla/Seamonkey?
Also, keep in mind that due to accessibility issue, the blind tend to rely on text-only interfaces. So if your company mandated by law to be accessible, Lynx support is important.
I’m all pro text only. But I think text browsers should move on to support JS. Though overall, if you also mean one-dimensional UI besides from text-only, that might be a problem for AJAX-style design.
It’s also important if you need to support Blackberry’s crippled HTML.
I guess Blckberry users would have to resort to a normal browser at times.
I am currently writing my diploma thesis about building enterprise applications in combination with rich internet client technologies.
In the beginning there was Javascript,DOM and HTML and the buzzword was DHTML. Now there’s the “new” crossbrowser XmlHttpRequest Object available and the buzzword is AJAX.
One problem within my thesis is the lack of a true RIA definition (beside wikipedia). And enables DHTML+AJAX HTML/Javascript solutions to be “rich” enough to be called RIA?
One problem within my thesis is the lack of a true RIA definition (beside wikipedia). And enables DHTML+AJAX HTML/Javascript solutions to be “rich” enough to be called RIA?
In my book it isn’t. But I think the hype of AJAX has shown that many want XUL/XAML functionality in browsers.
And to add to my above post, I think with XAML/Avalon getting backported to XP and eventually the ability of IE to run .NET bytecode its really going to push forward a lot of the stagnant browser capabilities, and Mozilla is going to have to do something to catchup.
I’m still not convinced that javascript is the answer for the language in the browser.
The one thing I am convinced about is that despite all the shortcomings of web apps, it’s here to stay because the deployment model is so seductive.
So who are you, Anonymous? And what’s the name of your book? Any other suggestions for my thesis are welcome. Currently I run into the flash based frameworks like openlaszlo and flex.
Echo2 is a Java web application framework that abstracts all the AJAX details from the developer.
Creating an application with Echo2 feels like creating a desktop application, in fact, the API is very similar to Swing.
I wrote a couple of Echo2 reviews a while back (both were featured here on OSNews). They can be seen at:
http://ensode.net/echo2_review.html
and
http://ensode.net/echo2_closer_look.html