I've updated the support for Silverlight in Intraweb to support the changes for the Silverlight 2 beta that has recently come out. To test the new functionality, I decided to put together a demo that shows how to not only use Silverlight controls, but to also interact with them using Intraweb. I then decided to take it one step further and use Intraweb as a service to provide data to the silverlight control.
Here I had two options: use Intraweb as a SOAP server, something that can be done very easily using Arcana's Elite Suite (now open source and available here) or use REST. I decided to choose SOAP so that I could show how easy it is. Unfortunately it didn't work. Not because Intraweb failed, nor did Arcana's components, but Silverlight did. It turns out that Silverlight has issues with certain web services.
So I had to opt for using REST, which in fact is good because it shows the simplicity and beauty of this architecture, where we get rid of the SOAP overhead. With
Intraweb, implementing a REST service is extremely simple. All that is required is to process the information in the OnBeforeDispatch and set the Handled property to True.
Since this is quite long (not that it's complicated, but I want to explain things with as much detail as I can), I've divided it up into several posts:
[Note: Integrating Intraweb and Silverlight is not complicated. The purpose of this demo is to show pretty much all the different things you can do and make use of a variety of technologies and techniques]
The final result is show below. It's not meant to be pretty, but functional and instructive. I'm using the AdventureWorks database shipped with SQL Server 2005. Download code from here