views:

36

answers:

2

I have two autocomplete scripts, one of them makes use of (A) php/mysql/html/jquery and the other makes use of (B) html/jquery/json.

I know that since they're using different technologies they might not be able to be compared directly, but from your own experience and from what you can gather from the pages these scripts are located on,

(Q:1) Which one would be faster/Better? (of course this is all preference i'm sure)

(Q:2) Why do you think that?

(Q:3) What are the benefits/downside to both?

I'll be hosted on a shared server on mediatemple for 20$ a month, eventually i'm going to go to the dedicated-virtual 50$ server.

Any information/direction would help a lot, thanks!

A: 

I would go for A as it is easier to customize. With B you lock yourself into a specific server solution.

They do use almost the same technology - the difference is mainly that B returns HTML (more data = slower) instead of JSON when using AJAX and with A you would have to write your own search logic server code.

It mainly depends on how conversant you are with the different technologies and what you are trying to do. If you know some server language I would definitely go for A as you have full control over search results returned.

If you have a very limited number of search results A is definitely the answer as you would not have to involve any server code at all. This means search would be very fast. Only code from you needed:

$('input#suggestBox').jsonSuggest('[{"id":1,"text":"Search Data 1"},{"id:2,"text":"Search Data 2"}');

To wrap up. If you are a coder go for A, if you want something limited that would be a bit slower but would work out of the box go for B.

sunn0
A: 

It depends on your application.

If u have lot of server logic to do choose A.

else use B.

seed_of_tree
excuse my naivety, but, what do you mean by 'server logic'? I googled and I could guess at what you mean but i'd rather know for sure.
android.nick
Server logic means most of time ur application interacts with database.
seed_of_tree