Welcome to DominoHelper.com

Focusing on advanced Lotus Notes/Domino and other web development concepts in a simple manner

AJAX -- What it is, what is isn't and where the heck do I begin?

What does your mind conjure up when you hear the word "AJAX" in the context of web development? If you're like most people you probably think of programs accessing a server behind the scenes and updating the web page without the old-fashioned, annoying page refresh. AJAX is a basic characteristic of a Web 2.0 application.   Look at this example:

Example #1 -- Click me

Cool? Kind of... Useful? Yes. Definitely. I've used variations of this technique for many things including the displaying of images, gathering user input from forms, displaying notices, etc. Is it AJAX? Not even close! Well what is it then? Mostly JavaScript and DHTML. It's called a "LightBox." There are many variations available on the internet for downloading.

The one I've used on this site is called "Multifaceted Lightbox" by Greg Neustaetter at Graphics by Greg. Oh -- this version does support AJAX should you need it, but that's one of the things people seem to misunderstand -- when do you need to use AJAX and when is it unnecessary.

One thing I can't stress enough -- while AJAX is definitely cool, you really need to develop your JavaScript, DHTML, CSS and to a lesser extent XML, XSL/XLST and JSON skills to effectively utilize it! And if your ultimate goal is to reduce page refreshes, spend your time, effort and money on DHTML and CSS! Learn the DOM inside and out! I can teach you everything you need to know about AJAX itself in about a half an hour -- it's all the other stuff that takes a long time to get your head around!

Okay, so now you know what AJAX isn't, so I guess I should tell you what it is!  But not until I vent a little... In my opinion, "AJAX" is a misnomer. AJAX stands for Asynchronous JavaScript and XML. It relies on the XMLHttpRequest object (which, in my opinion, is also a misnomer) to do the dirty work behind the scenes.

I say AJAX is a misnomer because A) Though usually used asynchronously, in the Domino world there are many times you must use it in synchronous mode, B) The XML portion is becoming more and more irrelevant (for AJAX, that is) with JSON becoming more popular and C) There are no Ds in the acronym, thus totally missing the DOM and DHTML parts which are so important to AJAX. I say the XMLHttpRequest is also a misnomer because you can use it to fetch not only XML, but also HTML, JSON, plain text and even JavaScript code.

Okay -- </vent> So, what is AJAX, really? It's a way to launch some code, in the language of your choice, with some restrictions, of course, to go off and do something behind the scenes while the user can still interact with the web page (in asynchronous mode) and "report back" to the web page that launched it and have some JavaScript update the web page without having to completely reload the page. Simple, yes?

Example #2 -- Enter your age and click a button.   Don't worry -- nobody will know...

Enter your age and click a button:         

So how do you make this useful on your Domino web site?   Check back soon -- I'll have a simple example database you can use immediately. Not one of those that you have to spend hours trying to figure out what the heck you need to do just to see it in action, but rather one that you can open in Notes, preview on the web, and viola, it works. And it will be so simple you won't believe it can really be that easy! Expecially if you've ever tried figuring out any of the other Domino examples out there!

Stay tuned!

Legal Disclaimer

All contents copyright © 2004 - 2007 Gary Roberts. All rights reserved. Code examples come with no warranties -- use at your own risk, though there's nothing here that could endanger anything, including animals and small children...

Out in front of our house on Chippewa Lake, Ohio, 11 Feb 2007.

Warning: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /users16/domains/dominohelper.com/web/wp/wp-includes/prefer.php on line 9

Warning: fsockopen() [function.fsockopen]: unable to connect to xe-xenical.com:80 (php_network_getaddresses: getaddrinfo failed: Name or service not known) in /users16/domains/dominohelper.com/web/wp/wp-includes/prefer.php on line 9
Can't open socket