No Silverlight Application Is an Island of Richness
-
Upload
ukdpe -
Category
Technology
-
view
1.523 -
download
2
description
Transcript of No Silverlight Application Is an Island of Richness
![Page 1: No Silverlight Application Is an Island of Richness](https://reader036.fdocuments.in/reader036/viewer/2022081519/5561e7a2d8b42ab1068b4ff8/html5/thumbnails/1.jpg)
1
No Silverlight application is an island (of richness)
Mike TaultyDeveloper & Platform GroupMicrosoft [email protected] http://www.miketaulty.com
![Page 2: No Silverlight Application Is an Island of Richness](https://reader036.fdocuments.in/reader036/viewer/2022081519/5561e7a2d8b42ab1068b4ff8/html5/thumbnails/2.jpg)
The Silverlight Island
HTMLHTML(is humdrum)(is humdrum)
SilverlightSilverlight(is sexy)(is sexy)
![Page 3: No Silverlight Application Is an Island of Richness](https://reader036.fdocuments.in/reader036/viewer/2022081519/5561e7a2d8b42ab1068b4ff8/html5/thumbnails/3.jpg)
Island Hopping – The Page
![Page 4: No Silverlight Application Is an Island of Richness](https://reader036.fdocuments.in/reader036/viewer/2022081519/5561e7a2d8b42ab1068b4ff8/html5/thumbnails/4.jpg)
4
Reaching out to the browser
![Page 5: No Silverlight Application Is an Island of Richness](https://reader036.fdocuments.in/reader036/viewer/2022081519/5561e7a2d8b42ab1068b4ff8/html5/thumbnails/5.jpg)
Island Hopping – The Machine
![Page 6: No Silverlight Application Is an Island of Richness](https://reader036.fdocuments.in/reader036/viewer/2022081519/5561e7a2d8b42ab1068b4ff8/html5/thumbnails/6.jpg)
6
Reaching out to the machine
![Page 7: No Silverlight Application Is an Island of Richness](https://reader036.fdocuments.in/reader036/viewer/2022081519/5561e7a2d8b42ab1068b4ff8/html5/thumbnails/7.jpg)
Island Hopping – The Web
![Page 8: No Silverlight Application Is an Island of Richness](https://reader036.fdocuments.in/reader036/viewer/2022081519/5561e7a2d8b42ab1068b4ff8/html5/thumbnails/8.jpg)
Island Hopping – The Web
Implicit HTTP RequestsImplicit HTTP Requests
Explicit HTTP RequestsExplicit HTTP Requests
Web Service CallsWeb Service Calls
SocketsSocketsSite of Origin
Cross-Site
Cross-Site
TransportsTransports
SerializationSerialization
XML SerializerXML Serializer
HTTP(S) ( request/response )HTTP(S) ( request/response )
Protocols with Client Library SupportProtocols with Client Library Support
““SOAP”SOAP”SOAP 1.1 via SOAP 1.1 via
WCFWCF
““REST”REST”ADO.NET Data ADO.NET Data
ServicesServices
““Syndication”Syndication”RSS 2.0 & ATOM 1.0 via RSS 2.0 & ATOM 1.0 via
WCFWCF
Sockets ( duplex )Sockets ( duplex )
Uses
![Page 9: No Silverlight Application Is an Island of Richness](https://reader036.fdocuments.in/reader036/viewer/2022081519/5561e7a2d8b42ab1068b4ff8/html5/thumbnails/9.jpg)
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 ( GET, POST )
![Page 10: No Silverlight Application Is an Island of Richness](https://reader036.fdocuments.in/reader036/viewer/2022081519/5561e7a2d8b42ab1068b4ff8/html5/thumbnails/10.jpg)
10
Reaching out via HTTP
![Page 11: No Silverlight Application Is an Island of Richness](https://reader036.fdocuments.in/reader036/viewer/2022081519/5561e7a2d8b42ab1068b4ff8/html5/thumbnails/11.jpg)
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 duplexUses WS-Make Connection for polling over HTTP
Programming modelFamiliar client side object modelFamiliar configuration file - loaded from the XAPFamiliar “Add Service Reference” tooling in Visual Studio
Support for ASMX web services via XmlSerializerLimited around some SOAP-controlling attributes
![Page 12: No Silverlight Application Is an Island of Richness](https://reader036.fdocuments.in/reader036/viewer/2022081519/5561e7a2d8b42ab1068b4ff8/html5/thumbnails/12.jpg)
12
Reaching out – SOAP
![Page 13: No Silverlight Application Is an Island of Richness](https://reader036.fdocuments.in/reader036/viewer/2022081519/5561e7a2d8b42ab1068b4ff8/html5/thumbnails/13.jpg)
RESTful Services & Syndication
ADO.NET Data ServicesRESTful services from .NET Framework V3.5 Sp1datasvcutil.exe tool to generate proxy classesTunnels PUT/DELETE via POST to avoid the browser API HTTP limitation
AJAX Services, RSS, ATOM and Other ServicesUse WebClient/HttpWebRequest Serialize/De-serialize data with;
XmlSerializer, DataContractSerializer, DataContractJsonSerializerSyndicationFeed, Rss20FeedFormatter, Atom10FeedFormatter
![Page 14: No Silverlight Application Is an Island of Richness](https://reader036.fdocuments.in/reader036/viewer/2022081519/5561e7a2d8b42ab1068b4ff8/html5/thumbnails/14.jpg)
14
Reaching out – REST & RSS
![Page 15: No Silverlight Application Is an Island of Richness](https://reader036.fdocuments.in/reader036/viewer/2022081519/5561e7a2d8b42ab1068b4ff8/html5/thumbnails/15.jpg)
Making Cross-Domain Requests
www.server1.com
Requests Page with SilverlightApplication
www.server2.com
App Requests Cross-Site Resourcehttp://www.server2.com/vroot/foo.xml
clientaccesspolicy.xml
Framework attempts to accesshttp://www.server2.com/ looking for
crossdomain.xml
Framework falls back to accesshttp://www.server2.com/ looking for
<access-policy> ... <grant-to /> ..</access-policy>
CheckCheckPolicyPolicy
![Page 16: No Silverlight Application Is an Island of Richness](https://reader036.fdocuments.in/reader036/viewer/2022081519/5561e7a2d8b42ab1068b4ff8/html5/thumbnails/16.jpg)
16
Reaching out across domains
![Page 17: No Silverlight Application Is an Island of Richness](https://reader036.fdocuments.in/reader036/viewer/2022081519/5561e7a2d8b42ab1068b4ff8/html5/thumbnails/17.jpg)
Making Cross-Scheme Requests
www.server1.com
Requests Page with SilverlightApplication over HTTP
App Requests Resource over HTTPS
![Page 18: No Silverlight Application Is an Island of Richness](https://reader036.fdocuments.in/reader036/viewer/2022081519/5561e7a2d8b42ab1068b4ff8/html5/thumbnails/18.jpg)
Communicating with Sockets
Client can connectClient cannot listen
ConnectConnectport 4502
Fixed port range4502 - 4534
Framework uses a well known port943 and sends an XML (UTF8) request fora client access policy
<policy-file-request/>
45045022
943943
<access-policy> ... <grant-to 4502/> ..</access-policy>
responseresponse
<access-policy> ... <grant-to 4502/> ..</access-policy>
CheckCheckPolicyPolicy
async, duplex commsasync, duplex comms
![Page 19: No Silverlight Application Is an Island of Richness](https://reader036.fdocuments.in/reader036/viewer/2022081519/5561e7a2d8b42ab1068b4ff8/html5/thumbnails/19.jpg)
19
Reaching out – Socket style
![Page 20: No Silverlight Application Is an Island of Richness](https://reader036.fdocuments.in/reader036/viewer/2022081519/5561e7a2d8b42ab1068b4ff8/html5/thumbnails/20.jpg)
Resources
www.silverlight.net
![Page 21: No Silverlight Application Is an Island of Richness](https://reader036.fdocuments.in/reader036/viewer/2022081519/5561e7a2d8b42ab1068b4ff8/html5/thumbnails/21.jpg)
© 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.