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
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