« AJAX and PHP Drag drop online site creator | Main | phAtJAX, AJAX Client and Server implementation »

Where can I use AJAX ? [Part 1]

Many use the places where you cannot use AJAX as a negative point for AJAX, while it is better to know that every technology isn't good for everything and everywhere. If C++ is excellent why there is Java, Delphi, Visual Basic ... and so on ? Every technology have its good and bad point, and the places where it should be used and where it cannot.

Same for AJAX, I was asked today about using AJAX inside a form. This case I find pretty interesting to show that we should study every case seperately and see if this technology fit better or another one. The answer can't be fondamental and without any real technical background. Ok here is the situation.

The application is fully web based will try to read data from barcode, and for every entry it creates a dynamic form including a textbox with the number retrieved from barcode and a select box with data from database. The idea behind thinking of AJAX is that the data retrieved from database could be loaded on demand. Everything is clear until now I hope.

But the situation is, it is a real application and the user when it start using the barcode he have to finish scanning a set of papers, it could be hundreds or thousands and then affect an entry from database to each number. So if I use AJAX I'll have to load data with each entry, even if its using cache.

So it was better to load data first, even that it will take time to load the page in the first time, and don't let the user wait for data to be retrieved with each dynamicly created inputs.

If you have similar experience with AJAX and real applications it is interesting to share with the AJAX community. So we won't have frameworks and implementations only but we'll have better experience for building more useful solutions.

Bookmark this article at these sites
Comments
1

No, it is (IMHO, etc.) better to use AJAX and load the data dynamically. Then cache the data in the page so that if a request is made for the same data again, you use the cache and not make a call. The missing info in the scenario above is how many of the requests per form, on average, are unique. I worked on a similar web based P.O.S. application for a small cellular phone store. The part I worked on was inventory check-in. While I did not use AJAX to do this, I wish I had. The form is constantly refreshing itself to fetch options when a new bar-code is scanned in. I could have sped the app up 10x by utilizing AJAX instead.

My $.02.

=C=

2

Cal I didn't detailed the requests and so because I have explained, the user in my case have to finish scanning lot of papers let's say 500 for example. He have to scan them one after the other to finish and I cannot make him wait until the data is loaded to scan the next document.

Even if the load time is small, there is another restriction that I didn't mention which is the risk of network problems during his work.

That's why I mentioned Part 1, cause there is more things to talk about :)

Post a comment





(Email will remain hidden)





Please enter the security code you see here




Related entries
Email to a friend
Email this article to:


Your email address:


Message (optional):