Thursday, June 16th, 2005

Cloning Google Suggest with AjaxAC

Category: Component, LiveSearch, PHP

<>p>Google Suggest was a close second to Google Maps in terms of its impact in my own web UI design. I had no idea that sophisticated auto-completetion could be done round-trip to a server fast enough to deliver a good user experience.

If you’re doing Ajax on PHP, you can learn how to implement Google Suggest by reading Quentin Zervaas’ article:

I’ve just published an article on my PHP article site about
developing a clone of Google Suggest using my AjaxAC framework…

The article is at:
http://www.phpriot.com/d/articles/php/application-design/google-suggest-ajaxac/index.html

Posted by Ben Galbraith at 12:21 am
2 Comments

+++--
3.4 rating from 27 votes

2 Comments »

Comments feed

I think the reason for google suggest’s tremendous popularity was not its implementation, but the idea itself. I’m guessing this, because I’ve written a clone of it as well, called Golick Suggests (I will be blogging all the code and steps soon, so see my blog or email me if you’re interested).

Although quite informative, I found the above article a touch long for its contents. For any experienced developer, creating a google suggests clone is really quite simple. One thing that I did like about it is that he used PHP.

PHP, although not that spectacular a language on its own, is perfect for using with AJAX, particularly in a situation like this. PHP does very little work, and all rendering and page generation is left up to javascript. Since most people simply use PHP for database accesses (as it is quite good at doing that in a very small amount of code), PHP works like a charm here.

The next step in all of this is to have php be able to serialize variables to a language that javascript can unserialize. Then passing data would be seemless.

I’ve created some functions on either side for that (see my blog later this month for more details).

James Golick

Comment by James Golick — June 16, 2005

The part added by Google is selected so when you keep typing it is deleted by what you type and hence a new suggestion (if available) will be given.

Comment by sydney — September 27, 2006

Leave a comment

You must be logged in to post a comment.