Coding an AjaxPro.NET Based Search Engine for Your Website - Finishing Up
(Page 4 of 4 )
Finally, you can press F5 to appreciate your work. The following Figure 2 shows one of the run-time snapshots.

Figure 2-one of the run-time snapshots of our search engine sample application.
In Figure 2, when the user enters some key words and waits for a very short amount of time (measured in milliseconds) a table will appear before him, displaying the data that meet the specified search condition. Additionally, a friendly "hint" message appears above the table to tell him how many items of data meet the search condition.
What's more, from the above Figure 2, clever readers may want to add a "Search" like button. That's a pretty good idea! But forgive me for leaving that as your homework.
Summary
In this article, with the help of the AjaxPro.NET server-side AJAX framework, we built a simple search engine which is based on the server-side database. Since XML is a standard format for transferring data and XSLT is a standard language for formatting and decorating XML data, we converted the original data persisted in the database (the XSLT data simply stored under a sub folder of the web site) into XML-formatted strings and passed them back via AjaxPro.NET.
Then, on the client side, with the help of AJAXSLT, the Google client-side AJAX framework, we reverted the XML-formatted strings to original XML/XSLT data. And further, by using AJAXSLT we turned the XML data into an HTML format that could finally be rendered on the browser.
Since this is just a demo for exploring local search engine techniques, the example in this article can be further enhanced and optimized in many aspects. We've only worked out two means of optimization for it. However, the optimization of this search engine is only limited by your imagination.
Have fun ajaxifying your web applications!
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |