WCF RIA Services
Microsoft WCF RIA Services simplifies the traditional n-tier application pattern by bringing together the ASP.NET and Silverlight platforms using WCF. The RIA Services provides a prescriptive pattern to write application logic that runs on the mid-tier and controls access to data for queries, changes and custom operations. It also provides end-to-end support for common tasks such as data validation, authentication and roles by integrating with Silverlight components on the client and ASP.NET on the mid-tier. It includes rich tooling for integrating client and mid-tier projects and for building rich UI through the simplicity of drag-drop support.
RIA Services Home Page with links to the download site, MSDN docs, talks ... can be found here.
The document above also insludes guidance on updating VS 2008/.NET 3.5 RIA Services applications to VS 2010/.NET 4
Please use the forums to provide feedback or post questions.
Sample download instructions
Please note that once you have downloaded a Sample.zip from below to your machine, you need to right click on the .zip, go to the Property Page and explicitly UnBlock the content. Only then should you extract the .zip file.
The walkthrough provides a step by step guide to building your first RIA services application.
The application we will be building here is an HR Application for an Enterprise.
Click here to download:
Getting Started - RIA Services HRApp Walkthrough Silverlight Business Application Templates using a modified Cosmopolitan Theme that looks like the Zune client.
Click here to download:
Application Templates
Feature Samples
This sample demonstrates a RIA Service's application working against NHibernate.
Click here to download:
NHibernate Sample This sample demonstrates how RIA Service's developers can leverage the power and flexibility of the WCF platform. It demonstares how WCF behaviors can be added to a Domain Service, how an explicit .SVC file can be generated for the default Domain Service WCF endpoint and how a custom ServiceHost can be defined for a Domain Service.
Click here to download:
WCF extensibility sample This sample demonstrates a WPF (Windows Presentaion Foundation) Application communicating with the WCF service exposed by a DomainService. The application does an AddServiceReference to the WCF DomainService to get a ServiceReferenceClient. It then queries the service for data, as well as makes updates to the data model.
The sample also shows has a Silverlight head working against the same Domain Service.
Click here to download:
'Add Service Reference' to a Domain Service These quick starts cover some of the use cases for Authentication in RIA Services. While some show basic integration with ASP.NET, others tackle more complex scenarios including custom authentication, offline support, and Windows Live ID integration. “Quick Start” comments have been included in the source to highlight and explain the implementation.
Click here to download:
Authentication Quick Starts This sample shows how to use client-side authorization to customize UI and authorize navigation through xaml markup. The main functionality is contained in a Silverlight library to make it portable and reusable. Included with this sample are guides that cover common scenarios to make client-side authorization easy to understand and implement.
Click here to download:
Authorization based dynamic UI and Navigation These samples build on the library included in part one and show how to implement Site-Map Navigation, Metadata-Aware Authorization, MVVM Authorization, and Permission-Based Authorization.
Click here to download:
Authorization and Navigation Samples, Part 2 This sample shows best practices for using the Silverlight ComboBox with RIA Services. It includes a small library of extensions to make the patterns easily reusable.
Click here to download:
ComboBox Sample for RIA Services This sample demonstrates how DAL layer can be mocked to Unit Test business logic code implemented in DomainService class. In this sample this is done my implementing a repository pattern, specifically a repository pattern with Linq To SQL as DAL. Instructions on using the sample can be found in the ReadMe doc included with the sample.
Click here to download:
Testing Domain Services [demos Repository pattern] This sample demonstrates how to create a custom DomainServiceDescriptionProvider that can participate in the RIA Services metadata pipeline to dynamically add entity metadata. Using this extensibility mechanism, the sample shows how metadata expressed externally (e.g. in an xml file or other external form) can be applied by the framework. This provides a way to add metadata to types that you can't modify by applying declarative attributes to directly.
Click here to download:
Custom Metadata Provider WCF RIA Services RC bits only supports VS 2010, .NET 4 and SL 4.
More details on RIA Services platform support can be found
here Click here to download:
Archived VS 2008, NET 3.5, SL 3 Samples This sample shows how to integrate WCF Routing (released in .Net 4) with RIA Services. Please keep in mind that in order for the sample works, you need the
AdventureWorksLT database deployed to your local SQL Server Express instance... and don't forget to update the connection string in Web.config!
More details can be found
here Click here to download:
Integration with WCF Routing
Application Samples
Contoso Sales is the RIA Services application demoed at PDC 2009 in Scott Guthrie's Keynote.
Click here to download:
Contoso Sales Application CyclingClassifieds sample is an ad-sharing intranet Web-application that lets users browse existing ads and post new ads. This sample demonstrates end to end usage of RIA Services and Silverlight features.
Click here to download:
Sample Classifieds Application This simple application demonstrates the use of XML data, a Plain Old CLR Object (POCO) DomainService and Search Engine Optimization (SEO). The ASP.NET DomainDataSource control is used to render content as well as a XML sitemap, all indexable by search engines. The down-level content is only visible to clients viewing the site without the required version of Silverlight installed (or JavaScript disabled).
Since ASP.NET DomainDataSource only supports .NET 4, this sample will only work on the VS 2010 release of RIA Services.
Click here to download:
Silverlight Store [demos POCO and SEO support]