Miguel A. Castro Architect IDesign SESSION CODE: WEB310.

Slides:



Advertisements
Similar presentations
Ron Jacobs Technical Evangelist Microsoft Corporation SESSION CODE: DEV207.
Advertisements

ineta  Solutions Architect & Trainer  Microsoft MVP (10 years and running!)  ASP Insider  VSX Insider  C# Insider  Azure Insider  Member of the.
Jason Tolley Technical Director ROK Technology Pty Ltd SESSION CODE: WEM305.
ineta .NET Architect, Developer, & Trainer  Microsoft MVP (10 years and running!)  ASP Insider  VSX Insider  C# Insider  Azure Insider  Member.
ineta .NET Architect, Developer, & Trainer  Microsoft MVP  ASP Insider  VSX Insider  C# Insider  Azure Insider  Member of the INETA Speakers.
Joe Kuemerle Lead Developer PreEmptive Solutions - SESSION CODE: DEV306.
Mark Harmsworth – Architecture Nate Bruneau – Engineering Scott Kleven – Program Management Microsoft Corporation SESSION CODE: OSP321.
Sometimes it is the stuff you know that hinders true progress.
Loren Goodman Chief Technology Officer InRule Technology SESSION CODE: ARC301 Putting Business Rules To Work.
The Secrets of Effective Technical Talks: How to Explain Tech without Tucking Them In! Presented by Mark Minasi and Mark Russinovich SESSION CODE: SIA334.
Ashwin Sarin Program Manager Microsoft Corporation SESSION CODE: COS204.
Maciej Pilecki Consultant, SQL Server MVP Project Botticelli Ltd. SESSION CODE: DAT403.
Boris Jabes Senior Program Manager Microsoft Corporation SESSION CODE: DEV319 Scale & Productivity in Visual C
Peter Provost Sr. Program Manager Microsoft Corporation SESSION CODE: DEV403.
Kevin Cox – SQL CAT Microsoft Corporation What are the largest SQL projects in the world? SESSION CODE: DAT305 Srik Raghavan –
Adam Machanic Database Consultant SQLblog SESSION CODE: DAT318.
END USER TOOLS AND PERFORMANCE MANAGEMENT APPS Excel PerformancePoint Svcs/ProClarity BI PLATFORM SQL Server Reporting Services SQL Server Reporting Services.
Brad Younge Principal Statera, Inc. SESSION CODE: COS304.
Janssen Jones Virtual Machine MVP Indiana University SESSION CODE: VIR403.
Bradley Millington Senior Program Manager Microsoft Corporation SESSION CODE: WEB 306.
Suhail Dutta Program Manager Microsoft Corporation SESSION CODE: DEV402.
Matt winkler program manager microsoft corporation SESSION CODE: ASI303.
Aaron Skonnard & Keith Brown Cofounders, Pluralsight SESSION CODE: ASI308 Programming AppFabric: Moving.NET to the Cloud.
Chandrika Shankarnarayan Senior Program Manager Microsoft Corporation SESSION CODE: ASI301.
Dan Wahlin The Wahlin Group SESSION CODE: WEB311.
Thomas Deml Principal Program Manager Web Platform and Tools Microsoft Corporation SESSION CODE: WEB308.
Paul Litwin Programmer Manager Fred Hutchinson Cancer Research Center SESSION CODE: WEB206.
Omar Khan SESSION CODE: WSV331. Simplification.
Jeff King Senior Program Manager, Visual Studio Microsoft Corporation SESSION CODE: WEB305.
Lori Dirks Expression Community Manager Microsoft Corporation SESSION CODE: WEB309.
Paul Schaeflein, MCT Manager of Advanced Technologies LaSalle Consulting Partners, Inc. SESSION CODE: OSP309.
Dan Holme Director of Training & Consulting Intelliem SESSION CODE: OSP214.
Vineet Sarda Senior Consultant Microsoft Corporation SESSION CODE: WCL302.
Chris Mayo Microsoft Corporation SESSION CODE: UNC207.
Bob Beauchemin Developer Skills Partner SQLskills SESSION CODE: DAT402.
Olivier Bloch Technical Evangelist Microsoft Corporation SESSION CODE: WEM308.
Richard Campbell Co-Founder Strangeloop Networks SESSION CODE: WEB315.
Younus Aftab Program Manager Microsoft Corporation SESSION CODE: WSV324.
By: Paul D. Sheriff or SESSION CODE: DEV320.
Kate Gregory Gregory Consulting SESSION CODE: DEV316.
Reza Chitsaz Senior Program Manager Microsoft Corporation SESSION CODE: DEV302 Building a SharePoint Collaboration Application in Visual Studio 2010.
Andrew Connell, MVP Developer, Instructor & Author Critical Path Training, LLC. SESSION CODE: OSP305.
Pat Altimore Sr. Consultant Microsoft Corporation SESSION CODE: WCL321.
David Ollason Lead Program Manager Microsoft Corporation SESSION CODE: UNC322 The New Communicator “14” Platform.
BIO202 | Building Effective Data Visualizations and Maps with Microsoft SQL Server 2008 Reporting Services BIU08-INT | Using.
Ted Pattison Author / Instructor Critical Path Training SESSION CODE: OSP315.
Martin Woodward Program Manager Microsoft Corporation SESSION CODE: DEV308.
Don Jones Senior Partner and Technologist Concentrated Technology, LLC SESSION CODE: DAT203.
Jesus Rodriguez Chief Architect, Tellago, Inc Microsoft Architect Advisor Microsoft MVP Oracle SOA ACE SESSION CODE: DEV406.
SESSION CODE: COS301. So what do we do?
ineta  Solutions Architect & Trainer  Microsoft MVP (10 years and running!)  ASP Insider  VSX Insider  C# Insider  Azure Insider  Member of the.
David A. Carley Senior SDE Microsoft Corporation SESSION CODE: DEV318.
John R. Durant Senior Product Manager Microsoft Corporation SESSION CODE: OSP313.
By: Paul D. Sheriff or SESSION CODE: WCL206.
Cube Measure Group Measure Partition Cube Dimension Dimension Attribute Attribute Relationship Hierarchy Level Cube Attribute Cube Hierarchy.
Brian A. Randell Senior Consultant MCW Technologies SESSION CODE: DEV311.
Christophe Fiessinger & Jan Kalis Senior Technical Product Manager Microsoft Corporation SESSION CODE: OSP209.
Aaron Skonnard President/CEO, Pluralsight SESSION CODE: ASI312.
Ken Getz Senior Consultant MCW Technologies, LLC SESSION CODE: WCL202.
Brent Ozar SQL Server Expert Quest Software SESSION CODE: DAT316.
Tobias Ternstrom Senior Program Manager Lead SQL Server Engine SESSION CODE: DAT404.
Luke Hoban Senior Program Manager Microsoft Corporation SESSION CODE: DEV307.
Andrew Connell, MVP Developer, Instructor & Author Critical Path Training, LLC. SESSION CODE: OSP319.
Douglas Boling President Boling Consulting Inc. SESSION CODE: WEM303.
Tim Laverty – Diego Vega – Program Managers Microsoft Corporation SESSION CODE: DEV305.
Stephen Forte Chief Strategy Officer Telerik stephenforte.net SESSION CODE: DEV303 Building Data Driven RESTful Applications.
Tech Ed North America /13/ :13 AM Required Slide
Implementing RESTful Services Using the Microsoft .NET Framework
A Lap Around Internet Explorer 9 For Developers
Tech Ed North America /6/2019 2:07 PM Required Slide
Presentation transcript:

Miguel A. Castro Architect IDesign SESSION CODE: WEB310

ineta .NET Architect, Developer, & Trainer  Microsoft MVP  ASP Insider  VSX Insider  Member of the INETA Speakers Bureau  Conference Speaker  In IT business since 1986 ineta

What is Bing The API and its Services Using the SOAP API Using the REST API The FluentSearch Toolkit Summary References

What is Bing The API and its Services Using the SOAP API Using the REST API The FluentSearch Toolkit Summary References

The Request

Specifies # of result items to return {10} Specifies where to start the search {0} Need to be true if Count and Offset set

The Call

The Response

Type Results Title Description DisplayUrl Url DateTime WebResult Title Url Thumbnail Url Width Height ImageResult Title PlayUrl StaticThumbnail Url Width Height VideoResult Title Url Source Snippet Date NewsResult Value SpellResult Title Url Business PhoneNumber Address StateOrProvince PostalCode Latitude Longitude DisplayUrl PhonebookResult TranslatedTerm TranslationResult

In the Config fileIn Code

What is Bing The API and its Services Using the SOAP API Using the REST API The FluentSearch Toolkit Summary References

{ "SearchResponse": { "Version":"2.2", "Query": { "SearchTerms":"Miguel A Castro"}, "Web": { "Total": , "Offset":0, "Results": [ { "Title":"Miguel Castro", "Description":"Miguel Castro "Url":" "CacheUrl":" "DisplayUrl":" "DateTime":" T22:38:20Z" }, { "Title":"DotNetDude.com - Miguel A. Castro's Blog", "Description":"Miguel A. Castro's DotNetDude.com... The user...", "Url":" "CacheUrl":" ", "DisplayUrl":"dotnetdude.com", "DateTime":" T13:41:28Z" } ] } Corresponds to Source Types requested in URL

{ "SearchResponse": { "Version":"2.2", "Query": { "SearchTerms":"Miguel A Castro"}, "Web": { "Total": , "Offset":0, "Results": [ { "Title":"Miguel Castro", "Description":"Miguel Castro "Url":" "CacheUrl":" "DisplayUrl":" "DateTime":" T22:38:20Z" }, { "Title":"DotNetDude.com - Miguel A. Castro's Blog", "Description":"Miguel A. Castro's DotNetDude.com... The user...", "Url":" "CacheUrl":" ", "DisplayUrl":"dotnetdude.com", "DateTime":" T13:41:28Z" } ] } Data Contract Object Model BingSearchResultData – top level Response (SearchResponse) Query Web WebResult[] (Results) Title Description Url Data Contracts for REST JSON Mapping

[OperationContract] [WebGet( UriTemplate = "json.aspx?Appid={appId}&Query={query}&Sources=web& Web.Offset=0", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)] BingSearchResultData GetWebSearchResults( string appId, string query);

[OperationContract] [WebGet( UriTemplate = "json.aspx?Appid={appId}&Query={query}&Sources=web& Web.Offset=0", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)] BingSearchResultData GetWebSearchResults( string appId, string query); Custom method will map to any URL structure you choose. REST-Specific WCF attribute (.NET 3.5+) URL (relative to base) to be called using this method. Arguments in URL MUST match arguments in method. (Note curly braces)

[OperationContract] [WebGet( UriTemplate = "json.aspx?Appid={appId}&Query={query}&Sources=web& Web.Offset=0", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)] BingSearchResultData GetWebSearchResults( string appId, string query); REST Service Contract No additional wrapping in metadata Format for data served by this method. Format for data this method will access (our case).

REST Bing Search WebHttpBinding binding = new WebHttpBinding(); binding.Security.Mode = WebHttpSecurityMode.None; WebChannelFactory factory = new WebChannelFactory ( binding, new Uri(" IBingService proxy = factory.CreateChannel(); BingSearchResultData results = proxy.GetWebSearchResults(key, query); BINDING CONTRACT ADDRESS

What is Bing The API and its Services Using the SOAP API Using the REST API The FluentSearch Toolkit Summary References

FluentSearch Demo var request = FluentSearchLib.FluentSearch.CreateRequest().SearchEngine("bing").SearchFor(txtSearchText.Text).PageSize(5).PageNumber(1).Web.UseKey(“{my app key}").CallbackTo(ResponseCallback, SynchronizationContext.Current); // SearchResponse response = request.Execute(); IAsyncResult asyncResult = request.ExecuteAsync(); private void ResponseCallback(SearchResponse response) { // context.Send(e => DisplayResults((SearchResponse)e), response); DisplayResults(response); } private void DisplayResults(SearchResponse response) { foreach (var item in response.Web.Results) { txtResults.Text += item.Title + Environment.NewLine +...

What is Bing The API and its Services Using the SOAP API Using the REST API The FluentSearch Toolkit Summary References

Required Slide Track PMs will supply the content for this slide, which will be inserted during the final scrub.

Required Slide Track PMs will supply the content for this slide, which will be inserted during the final scrub.

Sign up for Tech·Ed 2011 and save $500 starting June 8 – June 31 st You can also register at the North America 2011 kiosk located at registration Join us in Atlanta next year