Tue, April 22, 2008, 06:35 AM under
Silverlight
For the actual real content of this post I'll defer to other links, but at least you'll have all those links collected in one place: here ;-)In a nutshell, Silverlight 2 fully supports networking and calling services. It would be crazy if it didn't because by choosing the SL model you are choosing to run your application entirely on the client side (i.e. with no postbacks) so where will the real data come from (given that you are sandboxed in the browser and hence cannot access local data sources)? You have to connect somewhere to get it.
The High Level StatementBroadly speaking there are 4 options (which you can combine of course) to satisfy the requirement:
1. Call self-describing services such as asmx, WCF, Java services or anything else conforming to SOAP. This is what is mostly used in the enterprise space and you can imagine behind the service a database so the service is a facade into that.
2. Call URL-based services (aka POX or REST) where you must construct the URL yourself by piecing information you read from the service's documentation and then parsing the results that come back which is typically a lamp of XML or JSON. Think e.g. services from amazon, ebay, flickr, youtube, digg etc
3. Consume RSS or ATOM feeds. Hopefully I don't have to give examples of syndication here ;)
4. Raw sockets where communication takes place over the TCP channel.
Links Covering the 4 Sub-Topics Above- Quickstart on
Building a WCF Web Service and Accessing It by Using a Proxy- Quickstart on
Sending and Receiving Plain XML Messages- Quickstart on
Accessing Syndication Feeds with Silverlight- MSDN Documentation on
Working with Sockets- Karen's post on
Silverlight's HTTP Networking Stack- Wilco's post on
HttpWebRequest in Silverlight- Mahjayar's post on
Rundown of webservices-related Functionality in Beta 1- Mike's post on
Silverlight 2 and Sockets- Tim's post on
Calling Web Services in Silverlight 2- MSDN Documentation on
Accessing Web Services in Silverlight (6 rich sub sections)
"I only have 1 hour and 5 minutes to look into this stuff, where should I go?"You need to watch the
session from MIX titled "Working with Data and Web Services in Microsoft Silverlight 2" delivered by Eugene. The direct link to
the WMV file is here (save as).