A few weeks ago I spent some hours building some controls that ease the integration of search on a web site. My initial prototype consisted of two ASP.NET controls: a data source control and a composite control. Its objective was to search the web by using the MSN Search SOAP API. I documented the whole thing with some videos and power points presentations (everything in portuguese):
- The MSNSearcherDataSource and MSNSearcherUI controls (video pptx)
- MSNSearcherDataSource: how to build a data source control (video pptx)
- MSNSearcherUI: how to build a composite control (video pptx)
And here”s the source code for that initial prototype.
I then started thinking on how I could expand this project in order to add aditional searching capabilities. The provider pattern seemed like the way to go and while i was making the changes to the initial version of the prototype, the May future bits went live and ended up influencing my code. Now, I”ve written this code at least a month ago (I think:),,) but only today did i finished writing a small article that presents the main ideas that were behind the construction of this prototype. The good news is that the article is in English
Without further ado, here are the links:
If you download the latest version of the code, you”ll see that you have 2 demo sites. One shows how to use the existing controls against the default MSN Search provider. The second shows how to write your own provider (in this case, a provider that queries a simple database that stores info on some fruits).
As I say in the article, the main objective of this project is to share some ideas on how you can integrate searching in your ASP.NET pages. The current release ended up being heavily influenced by my initial problem (which consisted on using MSN to run searches) and by the release of the May preview bits while I was making the transition of the first to the second version. The latest release still needs some improvements (read the article to get more details), but i think the current version might be useful if you”re trying to integrate search on your ASP.NET applications.
A final disclaimer: the code is as-is and you”re free to use/change the code in whatever ways you see fit. Do notice that currently I”m not maintaining this code, though there”s still the possiblity of creating a project on codeplex so that everyone can contribute to the current release…