Mike Taulty DevDays 2010 Silverlight 4 Networking
Upcoming SlideShare
Loading in...5
×
 

Mike Taulty DevDays 2010 Silverlight 4 Networking

on

  • 1,640 views

 

Statistics

Views

Total Views
1,640
Views on SlideShare
1,627
Embed Views
13

Actions

Likes
1
Downloads
8
Comments
0

2 Embeds 13

http://mtaulty.com 11
http://www.slideshare.net 2

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Mike Taulty DevDays 2010 Silverlight 4 Networking Mike Taulty DevDays 2010 Silverlight 4 Networking Presentation Transcript

    • Change the Rules Silverlight 4 – Networking Mike Taulty, Microsoft UK mtaulty@microsoft.com mtaulty.com @mtaulty
    • browser launched, rich internet apps
    • have limited local access files hardware software ...
    • different types of Silverlight 4 apps
    • rich, controlled network access is key firewall
    • being network aware is useful
    • all network access is asynchronous your code not your code
    • network stack sketch
    • lots of capabilities to choose from • network protocols – HTTP, TCP, UDP • data encodings – text, binary • data serialization – XML, JSON, RSS, ATOM • messaging protocols – SOAP, REST, OData • messaging patterns – request  response, duplex, multicast • programming models – raw HTTP, WCF, WCF Data Services, sockets • security – cross-site, authentication, cross-scheme
    • and two key classes for HTTP itself • WebClient – simple, easier to use • (Http)WebRequest – more functionality, slightly more complex code
    • cross-domain security policy
    • there are two http stacks verbs: GET, POST automatic cookie management ( restricted ) set of request headers automatic authentication status codes: LIMITED ( 200, 400 ) verbs: ALL manual cookie management ( restricted ) set of request headers response headers & body authentication ( code & automatic ) status codes: ALL
    • switching between stacks
    • Change the Rules demo reaching out with HTTP
    • lots of capabilities to choose from • network protocols – HTTP, TCP, UDP • data encodings – text, binary • data serialization – XML, JSON, RSS, ATOM • messaging protocols – SOAP, REST, OData • messaging patterns – request  response, duplex, multicast • programming models – raw HTTP, WCF, WCF Data Services, sockets • security – cross-site, authentication, cross-scheme
    • sockets • support for streaming TCP sockets – Silverlight is a socket client, not a server – consider WCF netTCP as a better option • security – limited to ports 4502 to 4534 – policy file authorisation required - HTTP or TCP download – these restrictions do not apply to trusted applications
    • sockets • support for multicast UDP sockets – both single source & any source multicasting • programmability is via – Udp[Single/Any]SourceMulticastClient classes • security – port numbers must be above 1024 – policy file authorisation required – UDP download – these restrictions do not apply to trusted applications
    • multicast security for any source multicasting, the Silverlight client multicasts to the multicast group on port 9430 and waits for an authorisation
    • Change the Rules demo reaching out with sockets
    • lots of capabilities to choose from • network protocols – HTTP, TCP, UDP • data encodings – text, binary • data serialization – XML, JSON, RSS, ATOM • messaging protocols – SOAP, REST, OData • messaging patterns – request  response, duplex, multicast • programming models – raw HTTP, WCF, WCF Data Services, sockets • security – cross-site, authentication, cross-scheme
    • WCF subset in Silverlight for HTTP/TCP • transports - HTTP(S) and TCP • encodings - text and binary • serialization - DataContract* & XmlSerializer* • protocols - WS-I Basic Profile 1.1 – XML, HTTP, SOAP and WSDL – SOAP 1.2, WS-Addressing 1.0, WS-Security* • patterns - req/resp, duplex*, polled duplex* • privacy - HTTPS • authN - transport or message credential • faults - only available on the client stack
    • Change the Rules demo reaching out with WCF via HTTP/TCP
    • lots of capabilities to choose from • network protocols – HTTP, TCP, UDP • data encodings – text, binary • data serialization – XML, JSON, RSS, ATOM • messaging protocols – SOAP, REST, OData • messaging patterns – request  response, duplex, multicast • programming models – raw HTTP, WCF, WCF Data Services, sockets • security – cross-site, authentication, cross-scheme
    • RESTful services ( generically ) Resources HTTP Request URL Res 1 VERB GET Res 2 Payload POST Res 3 PUT Res 4 XML JSON DELETE HTTP Response Status Payload XML JSON
    • RESTful services ( more specifically ) • Open Data Protocol ( odata ) – www.odata.org – published under the Open Specification Promise • Extends the AtomPub standard to add – an addressing scheme – a mechanism for schema – alternate representation – JSON – handling for concurrent updates – handling for batched requests
    • WCF Data Services ( “Astoria” ) • implementation of odata for the client and the server http://server/customers(‘alfki’)/Orders?$top=20
    • Change the Rules demo reaching out with WCF Data Services
    • resources • Channel 9 Silverlight 4 MEF Screencasts – channel9.msdn.com/tags/SL4Networking • Silverlight .NET – www.silverlight.net
    • thank you for coming – please provide feedback  
    • Change the Rules Silverlight 4 – Networking Mike Taulty, Microsoft UK mtaulty@microsoft.com mtaulty.com @mtaulty