Live and Google search results (on the same page with ajax)

So last night I created something I was plotting to do for a while.  A search page for myself that does both the google and live search engines.  I'm hosting it over at Peace Love Code at http://www.peacelovecode.com/search/UpdatedSource Code posted at peacelovecode.com.

Now why did I do this?  To prove live's engine is better?  No.  I did it cause I did google searches before working at Microsoft a lot.  It is built into muscle memory.  I'm at google before I even know what hit me.  This was a cool way for me to see which engine gives ME better results.  I search for weird stuff, technical stuff dealing with computer languages and reverse engineering query string variables that are cryptic but deal with what I'm doing.

Smooth as silk Successes:

  • Dealing with the Live API's was easy.  Live's API allows me to do paging and return between 1 and 50 results unlike ...
  • Going from postbacks to ASP.Net Ajax callbacks are super easy.  One might as ... too easy.
  • I remembered how to do code without touching it for a few months.  I demand a cookie for doing this.

Problems:

  • UTF8 is evil.
  • The Google Ajax results is a hack using their Ajax search results.  Who knows how long they will allow this to work like this.  They can change it and break what I'm doing at any time.
  • Reverse engineering objects from JSON is hard.
  • Finding the api key for Live Search was a bit harder than I thought.  Microsoft calls it an AppID.  It can be found at http://search.msn.com/developer.
  • Google's wasn't exactly a walk in the park either if you don't enter through the front door (I didn't).  Their signup can be found http://code.google.com/apis/ajaxsearch/signup.html.
  • Google's Ajax Search results only give me 8 results back.  I don't think there is a way to page the results also.
  • Using ASP.Net Ajax, I couldn't fire off 2 Ajax requests side by side it seemed like.  I know there is some way to do it, I just don't know how ... yet.  This is for the "Search" button.  I want both panes to update independently.
  • I couldn't do a straight port of the app to ASP.Net Ajax, I know if I actually searched for this, I'd be able to convert the ASP.Net version to ASP.Net AJAX with ease.
  • Installed ReSharper and am fighting with some of the key bindings, they are different than what I had at my old job.

I'm with stupid moments:

  • It took me too long to figure out to do a server-side focus on a control is controlName.Focus();  I was looking for a function when there was a method call to do it right in my face.
  • I blanked out once on doing CSS

Christopher Hawkins Sep 25, 2007 @ 11:09 PM

# 
They could have made the ending more easy to understand, and I'm with you on the commercials... Overall the storyline was the most dissapointing part of the game... apart from that its virtually flawless.

Silk Plants May 4, 2009 @ 10:58 AM

# Mrs
very nice tips around , now i know

Post a Comment

Please add 7 and 3 and type the answer here: