2 No Silverlight (2) Application is an Island (of richness) Mike Taulty Microsoft UK...
-
date post
19-Dec-2015 -
Category
Documents
-
view
219 -
download
3
Transcript of 2 No Silverlight (2) Application is an Island (of richness) Mike Taulty Microsoft UK...
![Page 1: 2 No Silverlight (2) Application is an Island (of richness) Mike Taulty Microsoft UK Mike.Taulty@microsoft.com .](https://reader030.fdocuments.net/reader030/viewer/2022032800/56649d2d5503460f94a0441a/html5/thumbnails/1.jpg)
![Page 2: 2 No Silverlight (2) Application is an Island (of richness) Mike Taulty Microsoft UK Mike.Taulty@microsoft.com .](https://reader030.fdocuments.net/reader030/viewer/2022032800/56649d2d5503460f94a0441a/html5/thumbnails/2.jpg)
2
No Silverlight (2) Application is an Island (of richness)Mike TaultyMicrosoft [email protected] http://www.mtaulty.com
![Page 3: 2 No Silverlight (2) Application is an Island (of richness) Mike Taulty Microsoft UK Mike.Taulty@microsoft.com .](https://reader030.fdocuments.net/reader030/viewer/2022032800/56649d2d5503460f94a0441a/html5/thumbnails/3.jpg)
3
The Silverlight Island
HTML
Silverlight
![Page 4: 2 No Silverlight (2) Application is an Island (of richness) Mike Taulty Microsoft UK Mike.Taulty@microsoft.com .](https://reader030.fdocuments.net/reader030/viewer/2022032800/56649d2d5503460f94a0441a/html5/thumbnails/4.jpg)
4
Island Hopping – The Page
Silverlight
![Page 5: 2 No Silverlight (2) Application is an Island (of richness) Mike Taulty Microsoft UK Mike.Taulty@microsoft.com .](https://reader030.fdocuments.net/reader030/viewer/2022032800/56649d2d5503460f94a0441a/html5/thumbnails/5.jpg)
5
Reaching out to the browser
Demo
![Page 6: 2 No Silverlight (2) Application is an Island (of richness) Mike Taulty Microsoft UK Mike.Taulty@microsoft.com .](https://reader030.fdocuments.net/reader030/viewer/2022032800/56649d2d5503460f94a0441a/html5/thumbnails/6.jpg)
6
Island Hopping – The Machine
Silverlight
![Page 7: 2 No Silverlight (2) Application is an Island (of richness) Mike Taulty Microsoft UK Mike.Taulty@microsoft.com .](https://reader030.fdocuments.net/reader030/viewer/2022032800/56649d2d5503460f94a0441a/html5/thumbnails/7.jpg)
7
Reaching out to the machine
Demo
![Page 8: 2 No Silverlight (2) Application is an Island (of richness) Mike Taulty Microsoft UK Mike.Taulty@microsoft.com .](https://reader030.fdocuments.net/reader030/viewer/2022032800/56649d2d5503460f94a0441a/html5/thumbnails/8.jpg)
8
Island Hopping – The Web
![Page 9: 2 No Silverlight (2) Application is an Island (of richness) Mike Taulty Microsoft UK Mike.Taulty@microsoft.com .](https://reader030.fdocuments.net/reader030/viewer/2022032800/56649d2d5503460f94a0441a/html5/thumbnails/9.jpg)
9
Island Hopping – The Web
Implicit HTTP Requests
Explicit HTTP Requests
Web Service Calls
Sockets Site of Origin
Cross-Site
Cross-Site
Asyn
chro
nous
API
’s
Transports
SerializationWCF DataContractXML JSON
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
![Page 10: 2 No Silverlight (2) Application is an Island (of richness) Mike Taulty Microsoft UK Mike.Taulty@microsoft.com .](https://reader030.fdocuments.net/reader030/viewer/2022032800/56649d2d5503460f94a0441a/html5/thumbnails/10.jpg)
10
Making Use of HTTPWe 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
![Page 11: 2 No Silverlight (2) Application is an Island (of richness) Mike Taulty Microsoft UK Mike.Taulty@microsoft.com .](https://reader030.fdocuments.net/reader030/viewer/2022032800/56649d2d5503460f94a0441a/html5/thumbnails/11.jpg)
11
Reaching out with HTTP
Demo
![Page 12: 2 No Silverlight (2) Application is an Island (of richness) Mike Taulty Microsoft UK Mike.Taulty@microsoft.com .](https://reader030.fdocuments.net/reader030/viewer/2022032800/56649d2d5503460f94a0441a/html5/thumbnails/12.jpg)
12
SOAPy Web Services with WCFOnly 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
![Page 13: 2 No Silverlight (2) Application is an Island (of richness) Mike Taulty Microsoft UK Mike.Taulty@microsoft.com .](https://reader030.fdocuments.net/reader030/viewer/2022032800/56649d2d5503460f94a0441a/html5/thumbnails/13.jpg)
13
Reaching out with SOAP
Demo
![Page 14: 2 No Silverlight (2) Application is an Island (of richness) Mike Taulty Microsoft UK Mike.Taulty@microsoft.com .](https://reader030.fdocuments.net/reader030/viewer/2022032800/56649d2d5503460f94a0441a/html5/thumbnails/14.jpg)
14
RESTful Services & SyndicationADO.NET Data Services– RESTful services from .NET Framework V3.5 Sp1– Tunnels PUT/DELETE via POST to avoid the browser API HTTP
limitationAJAX Services, RSS, ATOM and Other Services– Use WebClient/HttpWebRequest – Serialize/De-serialize data with;
– XmlSerializer, DataContractSerializer, DataContractJsonSerializer– SyndicationFeed, Rss20FeedFormatter, Atom10FeedFormatter
![Page 15: 2 No Silverlight (2) Application is an Island (of richness) Mike Taulty Microsoft UK Mike.Taulty@microsoft.com .](https://reader030.fdocuments.net/reader030/viewer/2022032800/56649d2d5503460f94a0441a/html5/thumbnails/15.jpg)
15
Reaching out with REST, RSS
Demo
![Page 16: 2 No Silverlight (2) Application is an Island (of richness) Mike Taulty Microsoft UK Mike.Taulty@microsoft.com .](https://reader030.fdocuments.net/reader030/viewer/2022032800/56649d2d5503460f94a0441a/html5/thumbnails/16.jpg)
16
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>
CheckPolicy
![Page 17: 2 No Silverlight (2) Application is an Island (of richness) Mike Taulty Microsoft UK Mike.Taulty@microsoft.com .](https://reader030.fdocuments.net/reader030/viewer/2022032800/56649d2d5503460f94a0441a/html5/thumbnails/17.jpg)
17
Reaching out cross-domain
Demo
![Page 18: 2 No Silverlight (2) Application is an Island (of richness) Mike Taulty Microsoft UK Mike.Taulty@microsoft.com .](https://reader030.fdocuments.net/reader030/viewer/2022032800/56649d2d5503460f94a0441a/html5/thumbnails/18.jpg)
18
Making Cross-Scheme Requests
Requests Page with SilverlightApplication over HTTP
App Requests Resource over HTTPS
www.server1.com
![Page 19: 2 No Silverlight (2) Application is an Island (of richness) Mike Taulty Microsoft UK Mike.Taulty@microsoft.com .](https://reader030.fdocuments.net/reader030/viewer/2022032800/56649d2d5503460f94a0441a/html5/thumbnails/19.jpg)
19
Communicating with Sockets
Client can connectClient cannot listen
Connectport 4502
Fixed port range4502 - 4534
Framework uses a well known port943 and sends an XML (UTF8) request fora client access policy
<policy-file-request/>
4502
943
<access-policy> ... <grant-to 4502/> ..</access-policy>
response
<access-policy> ... <grant-to 4502/> ..</access-policy>
CheckPolicy
async, duplex comms
![Page 20: 2 No Silverlight (2) Application is an Island (of richness) Mike Taulty Microsoft UK Mike.Taulty@microsoft.com .](https://reader030.fdocuments.net/reader030/viewer/2022032800/56649d2d5503460f94a0441a/html5/thumbnails/20.jpg)
20
Reaching out with sockets
Demo
![Page 21: 2 No Silverlight (2) Application is an Island (of richness) Mike Taulty Microsoft UK Mike.Taulty@microsoft.com .](https://reader030.fdocuments.net/reader030/viewer/2022032800/56649d2d5503460f94a0441a/html5/thumbnails/21.jpg)
21
No Silverlight Application is an Island
Silverlight
![Page 22: 2 No Silverlight (2) Application is an Island (of richness) Mike Taulty Microsoft UK Mike.Taulty@microsoft.com .](https://reader030.fdocuments.net/reader030/viewer/2022032800/56649d2d5503460f94a0441a/html5/thumbnails/22.jpg)
22
Resources
www.silverlight.net
![Page 23: 2 No Silverlight (2) Application is an Island (of richness) Mike Taulty Microsoft UK Mike.Taulty@microsoft.com .](https://reader030.fdocuments.net/reader030/viewer/2022032800/56649d2d5503460f94a0441a/html5/thumbnails/23.jpg)
23
Resources
www.microsoft.com/teched Tech·Talks Tech·Ed BloggersLive Simulcasts Virtual Labs
http://microsoft.com/expression http://msdn.microsoft.com
Developer’s Kit, Licenses, and MORE!
![Page 24: 2 No Silverlight (2) Application is an Island (of richness) Mike Taulty Microsoft UK Mike.Taulty@microsoft.com .](https://reader030.fdocuments.net/reader030/viewer/2022032800/56649d2d5503460f94a0441a/html5/thumbnails/24.jpg)
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.