A Tour Through Microsoft Silverlight 3 RIA Services

The main focus of Silverlight RIA Services is to provide an easy-to-use infrastructure for service-enabling Silverlight Applications, sharing of common entity classes, and performing bi-directional work with data in your Silverlight applications. Controls can be made “data aware”, and you can save a lot of time by not having to write a lot of code to be able to work with data from the server. RIA services also provides an easy way to hook in ASP.NET Membership, Role, and Profile providers to your Silverlight application, and to enable the UserContext on Silverlight controls.

Once you grasp everything that Silverlight RIA Services offers, you will see that developing data-aware LOB applications with Silverlight has just been made an order of magnitude easier. You will be able to spend your time focusing on what you want your application to do instead of spending a lot of tedious time to put in the plumbing just to get to “first base”. Silverlight RIA Services already gives you all the plumbing, and it works great.

RIA Services is composed of 12 distinct  namespaces that all work together to provide a rich data model and plumbing framework for enterprise Silverlight applications:


System.ComponentModel.DataAnnotations Contains data Model extension metadata attributes and classes, Validation Attributes
System.Web.DomainServices Contains DomainService  and DomainServiceContext  and related classes / attributes
System.Web.DomainServices.LinqToEntities LinqToEntities related classes and ObjectContext extensions
System.Web.DomainServices.LinqToSql LinqToSql Domain Service and DataContext extensions
System.Web.DomainServices.Tools Custom MsBuild tasks to create Silverlight Client working proxy
System.Web.Ria DataServiceFactory and SilverlightApplication control for Silverlight RIA applications
System.Web.Ria.ApplicationServices User, Authentication and Profile classes to enable Membership, Roles, and Profiles
System.Web.Ria.Data AssociatedEntities, CodeProcessor, DataServiceResult for communicating data between service and client
System.Windows.Controls DomainDataSource and related classes
System.Windows.Data Descriptors and collections for grouping and sorting data
System.Windows.Ria.ApplicationServices Authentication, Login and User related classes
System.Windows.Ria.Data DomainClient, DomainContext, Entity and related classes

RIA Services provide three modalities – Framework, Tools, and Services.  Framework components support best – practices patterns for writing application logic and validation so that it can be easily used on the presentation tier. Tools add to existing Visual Studio capabilities by linking the client and mid-tier projects in a single solution and by enabling smart code generation in your Silverlight client projects. Services utilize the patterns to support commonly used capabilities such as authentication and user settings management.

.NET RIA Services focus on the end-to-end use of data. It may be retrieved through a Data Access Layer (DAL) of your choice. It can be shaped for use in the presentation tier and annotated with suitable metadata for validation and access control. The new framework components support data and metadata flow across tiers through a controlled set of operations.

There have been a number of additions and “last minute” downloads that didn’t quite make the MIX ‘09 presentation. If you want to get started with Silverlight RIA services, here are some very good links:

RIA Services Feedback Forum

What is Silverlight RIA Services?

RIA Services – from vision to architecture

Silverlight Store SEO Example

RIA Services Walkthrough Sample

Silverlight Business Application template files

Classifieds Sample


Finally, here is the main info page for the May 2009 Preview. Be sure to get the PDF as well!

I also have an article at  eggheadcafe.com on  using Membership, Roles and Profile with RIA, and I intend to publish at least one additional article soon.

NOTE: In the Business Application via Template files, it states that you must have SQLEXPRESS installed to use the built-in Authentication service. This is not 100% true. You can use regular SQL Server and any database you want, as long as you have run the ASPNET_REGSQL utility on it. Then just do this in your connectionStrings section of web.config:

    <remove name="LocalSqlServer"/>
    <add name="LocalSqlServer" connectionString ="server=(local);database=YOURDATABASENAME;Integrated Security=True"/>