Pick a Silverlight RIA scenario [D2D, B2E, B2B, B2C] or choose a Web Services style [SOAP/RPC, XML/REST]
As explained in What are those SOAP/RPC and XML/REST styles ?, the REST support in Silverlight has several limitations :
1. Manipulating a REST service model is done via 4 basic HTTP methods: GET, POST, PUT, DELETE . The last two methods are not yet supported by Silverlight :
2. Cache issue
You request data from a REST service by invoking a URI with the WebClient class. As all service communications are async in Silverlight, you process the result through an handler.
1: WebClient client = new WebClient();
2: client.DownloadStringCompleted +=
3: new DownloadStringCompletedEventHandler(client_DownloadStringCompleted);
4: client.DownloadStringAsync(new Uri(“http://foo.org/service/items”));
You may experience that the same data gets always retrieved, even when modified on the service side. To solve this problem :
client.DownloadStringAsync(new Uri(“http://foo.org/service/items?cache=" + DateTime.Now));
- Ronny Kwon