What is .NET RIA Services?
To quote Microsoft:
Microsoft .NET RIA Services simplifies the traditional n-tier application
pattern by bringing together
the ASP.NET and Silverlight platforms. RIA Services provides a 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.
In a nutshell, .NET RIA Services is a framework for bridging the client/server divide and exposing advanced data access and data shaping
directly to your Silverlight application. The framework includes code generators for Visual Studio which enable you to go from a table in a
relational database to paging, sorting, grouping and filtering that data with high-level client-side code in minutes, never having to think
about asynchronous web service calls, serialization, or any details of the objects you are dealing with. With the powerful DomainDataSource
control, you can do all that declaratively, in XAML, even with some advanced features like progressive loading.
The shaped result sets are then ready to be passed to UI controls, like those in Web.UI for Silverlight.
How can I use DomainDataSource with ComponentArt Web.UI for Silverlight?
The DomainDataSource control exposes a collection of data on the client which can be bound to directly by the controls in Web.UI.
Where the data shaping functionality really comes into play is the DataGrid control, which has its own logic and UI for controlling data access.
How can I use DomainDataSource with DataGrid for Silverlight?
From an abstract perspective, DataGrid is part of the presentation layer which ties in with all the business logic and plumbing provided by
.NET RIA Services.

ComponentArt DataGrid for Silverlight fits neatly into the .NET RIA Services picture, by connecting with DomainDataSource. Since DataGrid
binds with ObservableCollection, it can directly be fed the data that is exposed by DomainDataSource.
<ComponentArt:DataGrid x:Name="DataGrid1"
ItemsSource="{Binding Data, ElementName=MyDomainDataSource}" ... />
The main technical challenge is to connect changes to the view caused by user interaction with the DataGrid back to the DomainDataSource. There are
two basic ways of tying DataGrid to DomainDataSource, the main data shaping facility in .NET RIA Services: event-driven programmatic
linking and the automatic, codeless mode built into the DataGrid control.
1. Event based interaction
In this scenario, the developer anticipates situations in which the data view needs to change, and directs the DomainDataSource
to perform the appropriate change. For instance, when the DataGrid is paged, we can pass DomainDataSource the index of the new page and the
source collection will be updated with appropriate records.
private void DataGrid1_PageIndexChanged(object sender, DataGridPageIndexChangedEventArgs e)
{
(MyDomainDataSource.Data as IPagedCollectionView).MoveToPage(e.NewIndex);
}
A slightly more involved operation is required for sorting, and a similar approach is used for grouping and filtering:
private void DataGrid1_SortingChanged(object sender, DataGridSortingChangedEventArgs e)
{
// defer reloading while we make our changes
using (MyDomainDataSource.DeferLoad())
{
// clear old sort descriptors
MyDomainDataSource.SortDescriptors.Clear();
// add new ones to match the view of the DataGrid
foreach (DataGridSorting s in e.Sortings)
{
MyDomainDataSource.SortDescriptors.Add(
new SortDescriptor(s.Column.ColumnName, (SortDirection)s.Direction)
);
}
}
}
2. Codeless mode
The DataGrid control exposes a boolean property, EnableRiaCodeless, which (when set) will cause the control to automatically
attempt to pass view information (page index, sort order, grouping) to the source collection using the ICollectionView and IPagedCollectionView
interfaces. In this scenario, no code is needed at all and the control does everything automatically, by directly connecting user actions with
the data shaping capabilities of the data source.
<ComponentArt:DataGrid x:Name="DataGrid1"
ItemsSource="{Binding Data, ElementName=MyDomainDataSource}"
EnableRiaCodeless="true" ... />
A demonstration of this functionality in action can be seen here.
How does .NET RIA Services compare with ComponentArt's SOA.UI framework?
Microsoft's .NET RIA Services and the ComponentArt's SOA.UI framework aim to solve some of the same problems,
but in different ways. A key goal, in both cases, is a clean separation of concerns between the presentation and
business logic layers, in a service-based application environment. The details of our application logic should never
be tied to the actual presentation of it and one should be able to simply "plug" one into the other.
RIA Services alleviates difficulties in achieving this by allowing the developer to quickly and easily expose her
service-side business logic to the client-side, where his presentation can interface with it. Further helping matters,
it includes built-in functionality for performing complex data shaping in a standard way.
SOA.UI takes a different approach. By standardizing web services for the presentation tier, it creates a client-agnostic
presentation layer on the server, where it can easily be further separated from business logic, while only having to deal
with high-level needs of standard UI controls. In fact, there is no reason why a SOA.UI service couldn't "sit on top of"
.NET RIA Services by using that functionality in the implementation of its standard methods.
In the final analysis, the two frameworks are complementary.
Conclusion
Microsoft's .NET RIA Services is an exciting new tool for Silverlight developers. With Web.UI 2009.3 for Silverlight,
the ComponentArt Silverlight team has added important functionality for easily, seamlessly and codelessly tapping into its power.