Last May when we shipped the first CTP of Microsoft Codename “Astoria” we included a client library in addition to the components for the server. The original client library can be used from .NET applications in cases where you do not want to develop directly against the HTTP interface, and rather you want to use a higher-level API that works in terms of .NET objects.
Back then, we were just releasing Microsoft Silverlight Alpha 1.1, which includes support for using the .NET Framework inside Silverlight applications. Unfortunately, timing just didn’t work out well enough for us to include a version of the Astoria client library that could run inside the Silverlight Alpha 1.1 environment, so the only way to access Astoria services from code running in Silverlight was to use HTTP directly.
Now we have fixed that 🙂
Today we made available an add-on for the Astoria May 2007 CTP that consists of a new client library for use in Silverlight applications. You can simply add a reference to Microsoft.Astoria.SilverlightClient.dll to your Silverlight application and use the API just like you would in a regular .NET application. The add-on is available for download here:
In addition to the existing API, we added one small extension. Since most Silverlight applications will run on the web where network latency tends to be high, we included asynchronous query execution support, so that you don’t block the UI thread when waiting for an Astoria server to respond.
Porting to Silverlight was painless for the most part. Mainly just another build script. We only needed a few additional #ifdef’s for one or two specific things that either weren’t present or behaved slightly different in the Silverlight libraries. It took a little longer than planned to release, since at the same time we have been heads down building Astoria to ship as soon as possible, not really because porting it to Silverlight was difficult. 🙂
If you are interested in Silverlight + Astoria go ahead, download the CTP add-on and give it a shot. If you build something cool with it, please let us know!