Upload
kenneth-lee
View
557
Download
4
Tags:
Embed Size (px)
Citation preview
Windows Live Development SeriesSession 2: Site-Centric Services
[presenter info]
Series Agenda
• Session 1: Overview– Platform overview, service access, integration
• Session 2: Site-Centric Services– Search, Silverlight Streaming, Virtual Earth, Expo
• Session 3: User-Centric Services– Live ID, Spaces, Photos, Contacts, Messenger,
Alerts
Session Agenda
• Search• Silverlight Streaming• Virtual Earth• Expo
Live Search
• Client-side HTML forms• Server-side Web services
Live Search: Client-side
• Add a search box to your site in HTML• Benefits– Doesn’t require server-side development– Doesn’t impact server performance
• Drawbacks– Don’t [easily] get insight into visitor searches
Basic Search Box For Site<form method="get" action="http://search.live.com/results.aspx"> <input type="hidden" name="cp" value="437" /> <input type="hidden" name="FORM" value="FREESS" /> <table bgcolor="#FFFFFF"> <tr> <td> <a href="http://search.live.com/"> <img src="http://search.live.com/s/affillogoLive.gif"
border="0" alt="Live Search"/> </a> </td> <td> <input type="text" name="q" size="30" /> <input type="submit" value="Search Site" /> <input type="hidden" name="q1" value="site:microsoft.com"/><!– or your site --> </td> </tr> </table></form>
Advanced Search Box For Site & Web
Advanced Search Box For Site & Web*<meta name="Search.WLSearchBox" content="1.1, en-US" /><div id="WLSearchBoxDiv"><table cellpadding="0" cellspacing="0" style="width: 322px"><tr id="WLSearchBoxPlaceholder"><td style="width: 100%; border:solid 2px #4B7B9F;border-right-style: none;"><input id="WLSearchBoxInput" type="text" value="Loading..." disabled="disabled" style="padding:0;background-image: url(http://search.live.com/s/siteowner/searchbox_background.png);background-position: right;background-repeat: no-repeat;height: 16px; width: 100%; border:none 0 Transparent" /></td><td style="border:solid 2px #4B7B9F;"><input id="WLSearchBoxButton" type="image" src="http://search.live.com/s/siteowner/searchbutton_normal.png" align="absBottom" style="padding:0;border-style: none" /></td></tr></table>
<script type="text/javascript" charset="utf-8">var WLSearchBoxConfiguration={
"global":{"serverDNS":"search.live.com","market":"en-US"
},"appearance":{
"autoHideTopControl":false,"width":600,"height":400,"theme":"Blue"
},"scopes":[
{"type":"web","caption":"Microsoft","searchParam":"site:www.microsoft.com"
},{
"type":"web","caption":"Web","searchParam":""
}]
}</script><script type="text/javascript" charset="utf-8" src="http://search.live.com/bootstrap.js?market=en-
US&ServId=SearchBox&ServId=SearchBoxWeb&Callback=WLSearchBoxScriptReady"></script></div>
*- Or just use the easy wizard at http://search.live.com/siteowner
Live Search Web Service
• SOAP API for searching:– Ads, Images, InlineAnswers, News, PhoneBook,
QueryLocation, Spelling, Web, WordBreaker
• Free access with up to 25,000 queries per day per IP address– Commercial usage terms available
Sample Search API CodeMSNSearchService service = new MSNSearchService();SearchRequest request = new SearchRequest();
// You can search multiple sources at once and ask for any of the fields.// We search Web only here and ask for just the title and URL of the result.request.Requests = new SourceRequest[1];request.Requests[0] = new SourceRequest();request.Requests[0].Source = SourceType.Web;request.Requests[0].ResultFields = ResultFieldMask.Title | ResultFieldMask.Url;
request.CultureInfo = "en-US";request.Query = "QUERY TEXT";request.AppID = "APP_ID"; // Get from http://search.msn.com/developer
foreach (Result result in service.Search(request).Responses[0].Results){ // Process search result...}
Silverlight Streaming
• Online service for hosting Silverlight applications• Applications served from Microsoft servers– Great scalability and availability
• Limitations– 4GB total storage (to be removed eventually)– Videos cannot exceed 10 minutes in runtime or
~20MB– Peak outbound rate is 700 Kbps (if streaming media)
• No limitation on media quality or encoding
Silverlight Streaming Setup
• Administration– Create an account at http://silverlight.live.com to get
an account ID and secret key• Content preparation– Uploads are in ZIP format
• Using admin browser interface• Using REST API
• End users– Require the Silverlight runtime– Everything else is HTML/JavaScript
Silverlight Streaming Infrastructure
Silverlight OS/Browser SupportOS*/Browser IE6 SP2 IE 7.0 FireFox
1.5.x.x FireFox 2.0 Mac Safari 2.0.4
Windows XP Gold/SP1/SP2 Supported Supported Supported Supported Not Applicable
Windows Vista
Not Applicable Supported Supported Supported Not Applicable
Windows 2000
Not Supported; Planned
Not Supported; Planned
Not Supported; Planned
Not Supported; Planned
Not Applicable
Mac OS 10.4.8 PPC
Not Applicable
Not Applicable
Not Supported; Planned
Not Supported; Planned
Supported
Mac OS 10.4.8 Intel
Not Applicable
Not Applicable Supported
Not Supported; Planned
Supported
*Novell will deliver an implementation of Silverlight on Linux, called Moonlight.
Virtual Earth
• Virtual Earth– Hosted, programmable Geographic Information
System– No credentials required for Virtual Earth control
• MapPoint– Suite of products and services for integrating
location-based services– SOAP API developer account available at
https://mappoint-css.live.com/MwsSignUp
Virtual Earth Control
• Incredibly robust control for mapping and mashups
• Built-in zooming, panning, etc
• 3D available with ActiveX install
• Supports GeoRSS– Ideal for building overlays
with hover windows
Expo
• Marketplace available on live.com– Supports listing and searching just about
everything
• Accessible via HTTP/GET or SOAP API– Register for credentials at
http://expo.live.com/MyAPIKeys.aspx– Both mechanisms return XML to be parsed
Summary
• Search• Virtual Earth• Silverlight Streaming• Expo