Successfully reported this slideshow.
Your SlideShare is downloading. ×

No Silverlight Application Is an Island of Richness

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad

Check these out next

1 of 21 Ad

More Related Content

Slideshows for you (20)

Similar to No Silverlight Application Is an Island of Richness (20)

Advertisement

More from ukdpe (20)

Recently uploaded (20)

Advertisement

No Silverlight Application Is an Island of Richness

  1. 1. No Silverlight application is an island (of richness) Mike Taulty Developer & Platform Group Microsoft Ltd [email_address] http://www.miketaulty.com
  2. 2. The Silverlight Island HTML (is humdrum) Silverlight (is sexy)
  3. 3. Island Hopping – The Page
  4. 4. Reaching out to the browser
  5. 5. Island Hopping – The Machine
  6. 6. Reaching out to the machine
  7. 7. Island Hopping – The Web
  8. 8. Island Hopping – The Web Implicit HTTP Requests Explicit HTTP Requests Web Service Calls Sockets Site of Origin Cross-Site Cross-Site Transports Serialization XML Serializer HTTP(S) ( request/response ) Protocols with Client Library Support “ SOAP” SOAP 1.1 via WCF “ REST” ADO.NET Data Services “ Syndication” RSS 2.0 & ATOM 1.0 via WCF Sockets ( duplex ) Uses
  9. 9. Making Use of HTTP <ul><li>We won’t focus on implicit access; </li></ul><ul><li>2 main classes for explicit access; </li></ul><ul><li>WebClient offers simple GET/POST. </li></ul><ul><ul><li>HttpWebRequest offers more control. </li></ul></ul><ul><li>Browser API’s limit HTTP verbs ( GET, POST ) </li></ul>
  10. 10. Reaching out via HTTP
  11. 11. SOAPy Web Services with WCF <ul><li>Only basicHttpBinding is “in the box” </li></ul><ul><ul><li>SOAP 1.1, XML, HTTP(S) </li></ul></ul><ul><ul><li>not WS-Security, WS-Trust etc. </li></ul></ul><ul><li>Derived PollingDuplexHttpBinding for duplex </li></ul><ul><ul><li>Uses WS-Make Connection for polling over HTTP </li></ul></ul><ul><li>Programming model </li></ul><ul><ul><li>Familiar client side object model </li></ul></ul><ul><ul><li>Familiar configuration file - loaded from the XAP </li></ul></ul><ul><ul><li>Familiar “Add Service Reference” tooling in Visual Studio </li></ul></ul><ul><li>Support for ASMX web services via XmlSerializer </li></ul><ul><ul><li>Limited around some SOAP-controlling attributes </li></ul></ul>
  12. 12. Reaching out – SOAP
  13. 13. RESTful Services & Syndication <ul><li>ADO.NET Data Services </li></ul><ul><ul><li>RESTful services from .NET Framework V3.5 Sp1 </li></ul></ul><ul><ul><li>datasvcutil.exe tool to generate proxy classes </li></ul></ul><ul><ul><li>Tunnels PUT/DELETE via POST to avoid the browser API HTTP limitation </li></ul></ul><ul><li>AJAX Services, RSS, ATOM and Other Services </li></ul><ul><ul><li>Use WebClient/HttpWebRequest </li></ul></ul><ul><ul><li>Serialize/De-serialize data with; </li></ul></ul><ul><ul><ul><li>XmlSerializer, DataContractSerializer, DataContractJsonSerializer </li></ul></ul></ul><ul><ul><ul><li>SyndicationFeed, Rss20FeedFormatter, Atom10FeedFormatter </li></ul></ul></ul>
  14. 14. Reaching out – REST & RSS
  15. 15. 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/ looking for crossdomain.xml Framework falls back to access http://www.server2.com/ looking for <access-policy> ... <grant-to /> .. </access-policy> Check Policy
  16. 16. Reaching out across domains
  17. 17. Making Cross-Scheme Requests www.server1.com Requests Page with Silverlight Application over HTTP App Requests Resource over HTTPS
  18. 18. Communicating with Sockets <ul><li>Client can connect </li></ul><ul><li>Client cannot listen </li></ul><ul><li>Fixed port range </li></ul><ul><ul><li>4502 - 4534 </li></ul></ul>4502 943 Connect port 4502 Framework uses a well known port 943 and sends an XML (UTF8) request for a client access policy <policy-file-request/> <access-policy> ... <grant-to 4502/> .. </access-policy> response <access-policy> ... <grant-to 4502/> .. </access-policy> Check Policy async, duplex comms
  19. 19. Reaching out – Socket style
  20. 20. Resources www.silverlight.net
  21. 21. © 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.

Editor's Notes

  • 06/07/09 01:40 © 2007 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.

×