Download presentation
Presentation is loading. Please wait.
2
2 No Silverlight (2) Application is an Island (of richness) Mike Taulty Microsoft UK Mike.Taulty@microsoft.com http://www.mtaulty.com
3
3 The Silverlight Island HTMLHTML SilverlightSilverlight
4
4 Island Hopping – The Page SilverlightSilverlight
5
5 Reaching out to the browser
6
6 Island Hopping – The Machine SilverlightSilverlight
7
7 Reaching out to the machine
8
8 Island Hopping – The Web
9
9 Implicit HTTP Requests Explicit HTTP Requests Web Service Calls SocketsSockets Site of Origin Cross-Site Asynchronous API’s TransportsTransports SerializationSerialization WCF DataContract XMLXMLJSONJSON XML Serializer HTTP(S) ( request/response ) Protocols with Client Library Support “SOAP” SOAP 1.1 via WCF “SOAP” “REST” ADO.NET Data Services “REST” “Syndication” RSS 2.0 & ATOM 1.0 via WCF “Syndication” Sockets ( duplex ) Uses
10
10 Making Use of HTTP We won’t focus on implicit access 2 main classes for explicit access WebClient offers simple GET/POST – HttpWebRequest offers more control Browser API’s limit HTTP verbs to GET/POST
11
11 Reaching out with HTTP
12
12 SOAPy Web Services with WCF Only basicHttpBinding is “in the box” – SOAP 1.1, XML, HTTP(S) – not WS-Security, WS-Trust etc. Derived PollingDuplexHttpBinding for duplex – Uses WS-Make Connection for polling over HTTP Familiar Programming model – Client side object model – Configuration file - loaded from the XAP – “Add Service Reference” tooling in Visual Studio Support for ASMX web services via XmlSerializer – Limited around some SOAP-controlling attributes
13
13 Reaching out with SOAP
14
14 RESTful Services & Syndication ADO.NET Data Services – RESTful services from.NET Framework V3.5 Sp1 – Tunnels PUT/DELETE via POST to avoid the browser API HTTP limitation AJAX Services, RSS, ATOM and Other Services – Use WebClient/HttpWebRequest – Serialize/De-serialize data with; – XmlSerializer, DataContractSerializer, DataContractJsonSerializer – SyndicationFeed, Rss20FeedFormatter, Atom10FeedFormatter
15
15 Reaching out with REST, RSS
16
16 Making Cross-Domain Requests www.server1.com Requests Page with Silverlight Application www.server2.com App Requests Cross-Site Resource http://www.server2.com/vroot/foo.xml clientaccesspolicy.xml Framework attempts to access http://www.server2.com/http://www.server2.com/ looking for crossdomain.xml Framework falls back to access http://www.server2.com/http://www.server2.com/ looking for..... CheckPolicyCheckPolicy
17
17 Reaching out cross-domain
18
18 Making Cross-Scheme Requests Requests Page with Silverlight Application over HTTP App Requests Resource over HTTPS www.server1.com
19
19 Communicating with Sockets Client can connect Client cannot listen ConnectConnect port 4502 Fixed port range 4502 - 4534 Framework uses a well known port 943 and sends an XML (UTF8) request for a client access policy 4502 943..... responseresponse..... CheckPolicyCheckPolicy async, duplex comms
20
20 Reaching out with sockets
21
21 No Silverlight Application is an Island SilverlightSilverlight
22
22 Resources
23
23 Resources www.microsoft.com/teched Tech·TalksTech·Ed Bloggers Live SimulcastsVirtual Labs http://microsoft.com/expression http://msdn.microsoft.com Developer’s Kit, Licenses, and MORE!
24
24 © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.