aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes basic question about Ajax Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "basic question about Ajax" Watch "basic question about Ajax" New topic
Author

basic question about Ajax

Kishore Dandu
Ranch Hand

Joined: Jul 10, 2001
Posts: 1934
This is more of a operational/adaptability question.

I know Ajax is used by outlook for web, google for maps etc.

My question is: "what is its worth for high frequency sites like Ebay/Amazon etc??" "Can Ajax coexist with a full fledged content delivery system".

Looking forward to some insights on my questions.


Kishore
SCJP, blog
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Ajax can be used with high volume sites, the major thing that we need to watch for is the user interface. We do not want to screw up what a user is used to doing. We need ways to bookmark pages, handle refresh, and so on.

Ebay would be a GREAT place to use Ajax when the bids are coming down to the last minutes. Instead of use having to refresh the page over and over and over and over (I think you get the point) Ajax could be polling the server for changes in the bid.

We need to look at Ajax as a way to keep the page state and change and enhance a website. We do not want to reinvent the wheel.

Eric
Kishore Dandu
Ranch Hand

Joined: Jul 10, 2001
Posts: 1934
Some bottomline points I can deduct from above:
1. Ajax driven output can not be usable for thin client?

2. Ajax puts burden of efficient client side coding with deep thinking for performance on the client side..

Please give your counter or pro arguments about the above.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
IMO: Your business logic should remain on the server. The client should handle the user interaction like it always has in the real world. This ensures a level of security in your application. Ajax sends the data to the server to be processed and the client side code should take this data and make it available to the user.

The basic concept of Ajax is we are not pushing around the full weight of the page. We do not have to render the entire document time and time again to just figure out if one textbox has the right content in it. This means less data transfer back and forth per request, we do not loose the page's state and we can allow processing in the background while the person is still filling out a form. You see the processing taking place with google maps.

Look at this thread here, you will see some good uses of this technology. With Balaji example, you would not be able to do this effectivily without the XMLHttpRequest Object. You could use iframes, but that has problems. We talk about the problems with the traditional methods in the book.

Hopefully I answered your question..

Eric
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

You have mentioned in your BLOG that credit validation is not a good example of AJAX application.Why so?


Groovy
Kishore Dandu
Ranch Hand

Joined: Jul 10, 2001
Posts: 1934
are there any security issues with what ever is saved on the client side(sort of a small cache i guess)??

Do you think anything related to security will need to be out of scope for Ajaxish functionality???
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
I personally would not do credit card validation with Ajax, it could be done, but I feel like that needs to stick with the normal post back that people are used to. I really see the processing on the button being click tons of times by a person since they do not see the refresh.

Overall security for an Ajax app is nothing more than the security for a regular post back application. We need to deal with SQL injection and JavaScript injection. The way the person is logged in should not change and so forth.

The business logic needs to stay on the server to make the application more secure. Putting stuff such as direct SQL to your server is asking for a server meltdown.

Eric
Kishore Dandu
Ranch Hand

Joined: Jul 10, 2001
Posts: 1934
BTW did people like my new phrase "Ajaxish".

That made me think of some new verbiage:
1. Ajaxed
2. Ajaxism
3. Ajax-oriented
4. Ajaxophobia (u will sure get it once you become user of Google maps)
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
I already have used Ajaxish before you: http://radio.javaranch.com/pascarello/2005/11/09/1131566381315.html

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: basic question about Ajax