SlideShare a Scribd company logo
1 of 30
Download to read offline
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

More Related Content

What's hot

Group20 Dynamic Networks
Group20 Dynamic NetworksGroup20 Dynamic Networks
Group20 Dynamic Networks
hariprasadnr
 

What's hot (18)

What's up with HTTP?
What's up with HTTP?What's up with HTTP?
What's up with HTTP?
 
Http - All you need to know
Http - All you need to knowHttp - All you need to know
Http - All you need to know
 
The constrained application protocol (coap) part 2
The constrained application protocol (coap)  part 2The constrained application protocol (coap)  part 2
The constrained application protocol (coap) part 2
 
HTTP
HTTPHTTP
HTTP
 
Group20 Dynamic Networks
Group20 Dynamic NetworksGroup20 Dynamic Networks
Group20 Dynamic Networks
 
WSO2 ESB Introduction to Inbound Endpoints
WSO2 ESB Introduction to Inbound EndpointsWSO2 ESB Introduction to Inbound Endpoints
WSO2 ESB Introduction to Inbound Endpoints
 
HTTP
HTTPHTTP
HTTP
 
Introduction to WSO2 ESB Pass-Through Transport
Introduction to WSO2 ESB Pass-Through TransportIntroduction to WSO2 ESB Pass-Through Transport
Introduction to WSO2 ESB Pass-Through Transport
 
Http protocol
Http protocolHttp protocol
Http protocol
 
HTTP/2
HTTP/2HTTP/2
HTTP/2
 
HTTP
HTTPHTTP
HTTP
 
HTTP Protocol Basic
HTTP Protocol BasicHTTP Protocol Basic
HTTP Protocol Basic
 
21 Www Web Services
21 Www Web Services21 Www Web Services
21 Www Web Services
 
Proxy http ftp dns email
Proxy http ftp dns emailProxy http ftp dns email
Proxy http ftp dns email
 
The constrained application protocol (CoAP)
The constrained application protocol (CoAP)The constrained application protocol (CoAP)
The constrained application protocol (CoAP)
 
File Transfer Protocol - FTP
File Transfer Protocol - FTPFile Transfer Protocol - FTP
File Transfer Protocol - FTP
 
Http basics by-joshi_29_4_15-ppt
Http basics by-joshi_29_4_15-pptHttp basics by-joshi_29_4_15-ppt
Http basics by-joshi_29_4_15-ppt
 
Http-protocol
Http-protocolHttp-protocol
Http-protocol
 

Viewers also liked (8)

Microsoft's Web Platform
Microsoft's Web PlatformMicrosoft's Web Platform
Microsoft's Web Platform
 
MikeTaulty_Ux_Update
MikeTaulty_Ux_UpdateMikeTaulty_Ux_Update
MikeTaulty_Ux_Update
 
Optimising your site for search engines
Optimising your site for search enginesOptimising your site for search engines
Optimising your site for search engines
 
Mike Taulty DevDays 2010 Silverlight MEF
Mike Taulty DevDays 2010 Silverlight MEFMike Taulty DevDays 2010 Silverlight MEF
Mike Taulty DevDays 2010 Silverlight MEF
 
Numerical ruby-rails-israel-2013
Numerical ruby-rails-israel-2013Numerical ruby-rails-israel-2013
Numerical ruby-rails-israel-2013
 
Microsoft UK TechDays - ASP.NET 4.0 Overview
Microsoft UK TechDays - ASP.NET 4.0 OverviewMicrosoft UK TechDays - ASP.NET 4.0 Overview
Microsoft UK TechDays - ASP.NET 4.0 Overview
 
Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP
Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTPMike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP
Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP
 
SQL Azure Overview - ericnel
SQL Azure Overview - ericnelSQL Azure Overview - ericnel
SQL Azure Overview - ericnel
 

Similar to Mike Taulty DevDays 2010 Silverlight 4 Networking

Rest presentation
Rest  presentationRest  presentation
Rest presentation
srividhyau
 
D1-3-Signaling
D1-3-SignalingD1-3-Signaling
D1-3-Signaling
Oleg Levy
 
REST API Recommendations
REST API RecommendationsREST API Recommendations
REST API Recommendations
Jeelani Shaik
 
Computer network (10)
Computer network (10)Computer network (10)
Computer network (10)
NYversity
 
Computer network (4)
Computer network (4)Computer network (4)
Computer network (4)
NYversity
 

Similar to Mike Taulty DevDays 2010 Silverlight 4 Networking (20)

Web technologies: HTTP
Web technologies: HTTPWeb technologies: HTTP
Web technologies: HTTP
 
HTTP protocol and Streams Security
HTTP protocol and Streams SecurityHTTP protocol and Streams Security
HTTP protocol and Streams Security
 
Rest
RestRest
Rest
 
Web services
Web servicesWeb services
Web services
 
Rest presentation
Rest  presentationRest  presentation
Rest presentation
 
D1-3-Signaling
D1-3-SignalingD1-3-Signaling
D1-3-Signaling
 
Using Communication and Messaging API in the HTML5 World
Using Communication and Messaging API in the HTML5 WorldUsing Communication and Messaging API in the HTML5 World
Using Communication and Messaging API in the HTML5 World
 
Restful web services with java
Restful web services with javaRestful web services with java
Restful web services with java
 
Httpbasics 1207412539273264-9-converted
Httpbasics 1207412539273264-9-convertedHttpbasics 1207412539273264-9-converted
Httpbasics 1207412539273264-9-converted
 
REST API Recommendations
REST API RecommendationsREST API Recommendations
REST API Recommendations
 
HTML5 WebSockets
HTML5 WebSocketsHTML5 WebSockets
HTML5 WebSockets
 
Computer network (10)
Computer network (10)Computer network (10)
Computer network (10)
 
Cleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the Web
Cleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the WebCleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the Web
Cleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the Web
 
Computer network (4)
Computer network (4)Computer network (4)
Computer network (4)
 
Web
WebWeb
Web
 
.NET Conf 2022 - Networking in .NET 7
.NET Conf 2022 - Networking in .NET 7.NET Conf 2022 - Networking in .NET 7
.NET Conf 2022 - Networking in .NET 7
 
Mini-Training: Let's have a rest
Mini-Training: Let's have a restMini-Training: Let's have a rest
Mini-Training: Let's have a rest
 
Compute rNetwork.pptx
Compute rNetwork.pptxCompute rNetwork.pptx
Compute rNetwork.pptx
 
Api 101
Api 101Api 101
Api 101
 
Ch 3: Web Application Technologies
Ch 3: Web Application TechnologiesCh 3: Web Application Technologies
Ch 3: Web Application Technologies
 

More from ukdpe

Windows Phone 7: How (Not) to Fail Marketplace Ingestion
Windows Phone 7: How (Not) to Fail Marketplace IngestionWindows Phone 7: How (Not) to Fail Marketplace Ingestion
Windows Phone 7: How (Not) to Fail Marketplace Ingestion
ukdpe
 
Mike Ormond: Developing for Windows Phone 7
Mike Ormond: Developing for Windows Phone 7Mike Ormond: Developing for Windows Phone 7
Mike Ormond: Developing for Windows Phone 7
ukdpe
 
Microsoft UK TechDays - jQuery and ASP.NET
Microsoft UK TechDays - jQuery and ASP.NETMicrosoft UK TechDays - jQuery and ASP.NET
Microsoft UK TechDays - jQuery and ASP.NET
ukdpe
 
Microsoft UK TechDays - Top 10 ASP.NET 4.0 Features
Microsoft UK TechDays - Top 10 ASP.NET 4.0 FeaturesMicrosoft UK TechDays - Top 10 ASP.NET 4.0 Features
Microsoft UK TechDays - Top 10 ASP.NET 4.0 Features
ukdpe
 
Mike Taulty TechDays 2010 Silverlight 4 - What's New?
Mike Taulty TechDays 2010 Silverlight 4 - What's New?Mike Taulty TechDays 2010 Silverlight 4 - What's New?
Mike Taulty TechDays 2010 Silverlight 4 - What's New?
ukdpe
 
Mike Taulty DevDays 2010 Silverlight 4 - What's New Part 2
Mike Taulty DevDays 2010 Silverlight 4 - What's New Part 2Mike Taulty DevDays 2010 Silverlight 4 - What's New Part 2
Mike Taulty DevDays 2010 Silverlight 4 - What's New Part 2
ukdpe
 
Mike Taulty DevDays 2010 Silverlight 4 - What's New Part 1
Mike Taulty DevDays 2010 Silverlight 4 - What's New Part 1Mike Taulty DevDays 2010 Silverlight 4 - What's New Part 1
Mike Taulty DevDays 2010 Silverlight 4 - What's New Part 1
ukdpe
 

More from ukdpe (20)

Mike Ormond: Silverlight for Windows Phone 7 (UK TechDays)
Mike Ormond: Silverlight for Windows Phone 7 (UK TechDays)Mike Ormond: Silverlight for Windows Phone 7 (UK TechDays)
Mike Ormond: Silverlight for Windows Phone 7 (UK TechDays)
 
Windows Phone 7: How (Not) to Fail Marketplace Ingestion
Windows Phone 7: How (Not) to Fail Marketplace IngestionWindows Phone 7: How (Not) to Fail Marketplace Ingestion
Windows Phone 7: How (Not) to Fail Marketplace Ingestion
 
Mike Ormond: Developing for Windows Phone 7
Mike Ormond: Developing for Windows Phone 7Mike Ormond: Developing for Windows Phone 7
Mike Ormond: Developing for Windows Phone 7
 
Mike Taulty OData (NxtGen User Group UK)
Mike Taulty OData (NxtGen User Group UK)Mike Taulty OData (NxtGen User Group UK)
Mike Taulty OData (NxtGen User Group UK)
 
Microsoft UK TechDays - jQuery and ASP.NET
Microsoft UK TechDays - jQuery and ASP.NETMicrosoft UK TechDays - jQuery and ASP.NET
Microsoft UK TechDays - jQuery and ASP.NET
 
Microsoft UK TechDays - Top 10 ASP.NET 4.0 Features
Microsoft UK TechDays - Top 10 ASP.NET 4.0 FeaturesMicrosoft UK TechDays - Top 10 ASP.NET 4.0 Features
Microsoft UK TechDays - Top 10 ASP.NET 4.0 Features
 
Mike Taulty MIX10 Silverlight 4 Patterns Frameworks
Mike Taulty MIX10 Silverlight 4 Patterns FrameworksMike Taulty MIX10 Silverlight 4 Patterns Frameworks
Mike Taulty MIX10 Silverlight 4 Patterns Frameworks
 
Mike Taulty MIX10 Silverlight 4 Accelerated Fundamentals
Mike Taulty MIX10 Silverlight 4 Accelerated FundamentalsMike Taulty MIX10 Silverlight 4 Accelerated Fundamentals
Mike Taulty MIX10 Silverlight 4 Accelerated Fundamentals
 
Mike Taulty TechDays 2010 Silverlight 4 - What's New?
Mike Taulty TechDays 2010 Silverlight 4 - What's New?Mike Taulty TechDays 2010 Silverlight 4 - What's New?
Mike Taulty TechDays 2010 Silverlight 4 - What's New?
 
Mike Taulty DevDays 2010 Silverlight 4 - What's New Part 2
Mike Taulty DevDays 2010 Silverlight 4 - What's New Part 2Mike Taulty DevDays 2010 Silverlight 4 - What's New Part 2
Mike Taulty DevDays 2010 Silverlight 4 - What's New Part 2
 
Mike Taulty DevDays 2010 Silverlight 4 - What's New Part 1
Mike Taulty DevDays 2010 Silverlight 4 - What's New Part 1Mike Taulty DevDays 2010 Silverlight 4 - What's New Part 1
Mike Taulty DevDays 2010 Silverlight 4 - What's New Part 1
 
Mike Taulty MIX10 Silverlight Frameworks and Patterns
Mike Taulty MIX10 Silverlight Frameworks and PatternsMike Taulty MIX10 Silverlight Frameworks and Patterns
Mike Taulty MIX10 Silverlight Frameworks and Patterns
 
Explaining The Cloud
Explaining The CloudExplaining The Cloud
Explaining The Cloud
 
Microsoft In Education - Steve Beswick
Microsoft In Education - Steve BeswickMicrosoft In Education - Steve Beswick
Microsoft In Education - Steve Beswick
 
How Microsoft Secures its Online Services [WHITEPAPER]
How Microsoft Secures its Online Services [WHITEPAPER]How Microsoft Secures its Online Services [WHITEPAPER]
How Microsoft Secures its Online Services [WHITEPAPER]
 
Overview of Microsoft App-V 4.5
Overview of Microsoft App-V 4.5Overview of Microsoft App-V 4.5
Overview of Microsoft App-V 4.5
 
Entity Framework 4 In Microsoft Visual Studio 2010 - ericnel
Entity Framework 4 In Microsoft Visual Studio 2010 - ericnelEntity Framework 4 In Microsoft Visual Studio 2010 - ericnel
Entity Framework 4 In Microsoft Visual Studio 2010 - ericnel
 
MikeTaulty_Ux_Update
MikeTaulty_Ux_UpdateMikeTaulty_Ux_Update
MikeTaulty_Ux_Update
 
Ecm For The Masses Share Point 2010 Summit Tim Wallis Content And Code
Ecm For The Masses   Share Point 2010 Summit  Tim Wallis   Content And CodeEcm For The Masses   Share Point 2010 Summit  Tim Wallis   Content And Code
Ecm For The Masses Share Point 2010 Summit Tim Wallis Content And Code
 
Hell Froze Over, Pigs Flew, Microsoft Went Open
Hell Froze Over, Pigs Flew, Microsoft Went OpenHell Froze Over, Pigs Flew, Microsoft Went Open
Hell Froze Over, Pigs Flew, Microsoft Went Open
 

Recently uploaded

Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 

Recently uploaded (20)

Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 

Mike Taulty DevDays 2010 Silverlight 4 Networking

  • 1. Change the Rules Silverlight 4 – Networking Mike Taulty, Microsoft UK mtaulty@microsoft.com mtaulty.com @mtaulty
  • 2. browser launched, rich internet apps
  • 3. have limited local access files hardware software ...
  • 4. different types of Silverlight 4 apps
  • 5. rich, controlled network access is key firewall
  • 7. all network access is asynchronous your code not your code
  • 9. 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
  • 10. and two key classes for HTTP itself • WebClient – simple, easier to use • (Http)WebRequest – more functionality, slightly more complex code
  • 12. 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
  • 15. 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
  • 16. 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
  • 17. 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
  • 18. multicast security for any source multicasting, the Silverlight client multicasts to the multicast group on port 9430 and waits for an authorisation
  • 19. Change the Rules demo reaching out with sockets
  • 20. 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
  • 21. 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
  • 22. Change the Rules demo reaching out with WCF via HTTP/TCP
  • 23. 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
  • 24. 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
  • 25. 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
  • 26. WCF Data Services ( “Astoria” ) • implementation of odata for the client and the server http://server/customers(‘alfki’)/Orders?$top=20
  • 27. Change the Rules demo reaching out with WCF Data Services
  • 28. resources • Channel 9 Silverlight 4 MEF Screencasts – channel9.msdn.com/tags/SL4Networking • Silverlight .NET – www.silverlight.net
  • 29. thank you for coming – please provide feedback  
  • 30. Change the Rules Silverlight 4 – Networking Mike Taulty, Microsoft UK mtaulty@microsoft.com mtaulty.com @mtaulty