Some of you might have wondered why I rarely refer to the term AJAX. The answer is quite simple. I rarely use it, but I often use XMLHTTPRequest. Let me explain that.
You interaction must be asynchronous, meaning that the client and server must work independently - and communicate independently. Or, as Adaptive Path puts it "without stalling a user's interaction with the application."
But, very few applications that claim to use AJAX are asynchronous. To give you an example take "Remember the Milk" - An excellent AJAX application. Well, it is an excellent application, but apart from the sign-up page, it is not an AJAX application.
When you add a new task (to do), you have to wait until the task has been saved before you can continue your work. Granted it does save and refreshes the task list, without having to reload the page. But, it does not function "without stalling a user's interaction with the application".
"Remember the Milk" is using synchronous interaction (just like most other so-called AJAX applications). It is just done in a very fancy way. It is an XMLHTTPRequest application.
Not to mention that XMLHTTPRequest is not limited to browsers either. You can use it in applications as well. This allows you to handle internet based data sources as local data - one example is the task-pane "Research" in Microsoft Office.
XML sounds very good. Everybody talks about it. It is the next thing in almost every new product - and it is a standard too. But why use it in the browser? I understand why you want use on the server, also why you want use to store documents of database content. With XML you get the content and the structure in an extremely flexible format.
But, in your "AJAX" applications do you ever send XML data? I am guessing no - I know I have never done that.
To save XML data you have to get the value from your form field, wrap into XML tags, and send it to the server. The server then has to unwrap it, and put in the database. It is much easier to simply send only data, and leave out all the XML stuff.
This is also what most people do. Sending XML is not a feasible solution. That is unless you are in a situation where you have to send more than one form field - like the complete contents of a table.
What about receiving XML data? I know a lot of who do just that. But, for me that is equally impractical.
What a waste of efforts. What you have is pure data in your database, which you want outputted as either pure data, or HTML. Why go trough all that XML stuff? You do not need it. You can do the same much faster without.
Why not just have the server generate HTML directly, and send that. Then the client does not have to do a thing. It is still XMLHTTPRequest but, it is a 70-80% speed increase.
AJAX is a good idea. The asynchronous part is brilliant, although not always practical. But AJAX is also very limited - and slow.
Instead consider AHAX (since the web community seems to need acronyms). AHAX is short for "Asynchronous Handling + XMLHTTPRequest". The concept is the same as AJAX, but without its many limitations.
You still need to make your applications asynchronous (truly separate the user from any client-server interactions). You are not limited to a single script or programming language and you are not limited to a single data format.
AHAX can be used on both the client, the server, and in normal applications. I have never really used AJAX, but I use AHAX in 90% of my recent projects.
Full access for... $9 per month
Full access for... $99 per year
Join 'The Weekly Update' to get an email every Friday afternoon with the latest from Baekdal + noteworthy articles from around the web.
What the shift in media is really all about.
Free for subscribers
$8.79 on Amazon
It is not about creating a shop in a tab. It is about turning communication into sale.
Free for subscribers
$7.58 on Amazon