Following the introduction of the instant search feature by Google some 2 week ago (in mid-September), I have decided to look into creating a small search interface that would allow the same kind of instant (ajaxified searching) for another popular website: youtube.com to see what would be the challenges of building such a web application with the aid of ASP.net and AJAX.

So following a few late nights of research and coding, I had uploaded version 2 of the application I call Instant-tube today. This web-app allows searching through the youtube.com video database as you type. You can access the application at the following URL and play with it:

                    http://www.instant-tube.com

What I would like to do through this blog post and the ones which will follow is to share with you the design, implementation and features of such an application, to try and demystify instant searching. In today's post I would just like to enumerate the basic features that I set out to have when building the application, implementation details and design challenges will be addressed in upcoming posts.

Design Specifications of Instant Searching:

 1. Search as you type:

Instant searching is actually just the capacity to repeat a search every time a user types in a new character in the search text box. Thus, to implement such a feature, all one would have to do is to react to a text box event that warns of a new character having been typed in and re-launch the search. The major constraint would be to only refresh the results part of the page and not the textbox itself as to not block the user from continuing to type while the application is searching on his behalf. This is where Ajax should come into play to allow you to partially refresh parts of the page.

2. Predictive searching:

Finding results as you type is good but not good enough. Modern search engine interfaces are also good at predicting what you type, and proposing words and phrase choices while you are typing giving you the possibility to auto-complete the text you have entered. This can be done with the Ajax Control Toolkit auto-complete control, but the design challenge here is to be able to get the word and phrase suggestions from a real search engine instead of just presenting the user with random suggestions.

 3. Search Bookmarking:

The nice feature that Ajax allows ASP.net applications to achieve is to refresh only portions of a page being viewed by the user. However, when doing so, the url of the page in question does not change. This is contrary to what modern search engines have gotten the average user accustomed to – since they encode the query in the url, so that just by bookmarking the url, and coming back to it later, a user is able to rerun his search. Thus it would be necessary to allow for Ajax searching from within the interface, but also to dynamically modify the query string as the user runs his search.

In the following post I will offer step by step solutions to address these design specifications and more, but until then I encourage you to play with the interface, see if you like it, and even forward it to other people you know.

By Paul Cociuba – ASP.net Engineer.

Follow what I read via Linqto.me