Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ajax with NO server side logic

 
Mike Fryer
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64982
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Mike Fryer
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We're talking about a 100 records.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then I would not worry about any performance hits storing them into a JavaScript Array.

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic