File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Ajax with NO server side logic 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 "Ajax with NO server side logic" Watch "Ajax with NO server side logic" New topic
Author

Ajax with NO server side logic

Mike Fryer
Greenhorn

Joined: Jun 11, 2006
Posts: 3
Our current application has an autocomplete logic on the server. We want to move this logic to the client side. I am thinking of using JavaScript to achieve this, but my architect wants me to use Ajax instead of a pure JavaScript solution. He also wants me to avoid using server calls. I don't understand him. Why would I need Ajax when I can achieve the same thing using Javascript (and there are no trips to the server anyways)? Ajaxers, your help please..
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61768
    
  67

Since Ajax is a means to make server calls under Javascript control, saying to use Ajax without making a server call is about as close to nonesense as things can get.

I'd ask for clarification.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Mike Fryer
Greenhorn

Joined: Jun 11, 2006
Posts: 3
I did a bit of googling after posting my question and I found this link suggesting the use of Ajax without server side code:

Ajax with no server side code

This led me to think that there may be a benfit to use Ajax with no server side coding. Is my understanding wrong?
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
What is the benefit? I see none at. More places for the code to go wrong and more time to get the information since an Ajax call is not free. It adds bandwidth and you have to worry about other outside factors. With a solution that does not use Ajax, you get more benefits, but the one issue is the amount of records we are talking about.

How many records are we talking here for an autocomplete?

Eric
Mike Fryer
Greenhorn

Joined: Jun 11, 2006
Posts: 3
We're talking about a 100 records.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Then I would not worry about any performance hits storing them into a JavaScript Array.

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Ajax with NO server side logic