Cloning Google Suggest with AjaxAC
Today I ran through this tutorial and successfully created a Google Suggest clone! My application sits localhost on an IIS server with MySQL and PHP5. Maybe someday if I find a use for it I can implement it for the world to see.
The tutorial itself was really easy to follow. It doesn’t take all that long to get a working clone if you don’t want to understand how it works. If you do want to understand how it works, you may have to sit down for a while and study the beta AjaxAC framework. Basically, the end result is a form which queries the MySQL database and presents results in a DIV below the form. It’s pretty slick, but not as slick as the real thing.
What does the application you create not do? It doesn’t index your pages, so try not to be disappointed that the thing doesn’t actually search. It does, however, search a table in a database that has the site name, and a fictional number of results. I ended up changing my table structure so it included the site name and the URL (which I think is much more practical since you’re not going to get a full Google search out of it). I also got rid of the “search” button, since I don’t really need that feature.
There’s another tutorial out there that clones Google Suggest with PHP, but a quick glance at it tells me that following that one requires more grunt work.




4 Comments