.NET RIA Services (formerly code-named Alexandria and what I have been working on for the most part during the past year) is now public. It has even been termed as the real premiere of Silverlight, which is nice to read as you might imagine :-). I had a similar blog post yesterday about the progression of Silverlight from its early v1 roots to a real app platform in v3.
A quick description of .NET RIA Services is in order:
.NET RIA Services builds on Silverlight 3 on the client and ASP.NET on the server to simplify building n-Tier data-driven applications. First, .NET RIA Services provides a prescriptive CRUD-based pattern for authoring your application/domain/business logic, i.e. queries, operations, rules for authorization, validation etc. on the middle tier and makes that functionality easily consumable from your presentation tier in the form of bindable data. Second, on the presentation tier, we're providing new data controls such as a DataSource, enhanced DataGrid and DataForm/DataPager controls for mainline data/LOB scenarios. Third, we're also providing higher level building blocks such as authentication, cross-tier user state and the like.
I have some more insight to share (that deserves its own blog post) around what .NET RIA Services really is, but I wanted to do a quick post related to my MIX talk, T41F - Building Data-Driven Applications in ASP.NET and Silverlight (click for the video). Here are the accompanying slides and code:
I know some folks were eager to go over what I showed line by line. Feel free to ask questions you might have in the comments section below.
Update 3/24:Added missing SQL script I forgot to include, that you need to recreate the database to run the samples on your end!
A quick overview of what I showed:
- Hello Data/Hello .NET RIA Services - I showed a simple demo to write some simple application logic on the server to expose a list of products and render them declaratively in a DataGrid/DataForm via a DomainDataSource control within Silverlight. I extended this demo to show a facility we have for doing simple projections when sending data down to the client.
- Store Application - this was a simple application based on the IBuySpy sample data, containing products and categories. I showed accessing data imperatively using LINQ queries on the client that are sent down to the server by .NET RIA Services. I next showed editing, ala Update bit of CRUD, and then showed one cool new addition we're adding to the CRUD foundation - custom application logic methods (to cater to specialized and domain-specific update operations). Along with editing I showed imperative validation on the server (with the error flowing to the client), validation rules attached declaratively using metadata annotations, and custom validation through a simple method in code that can be shared between the client and the server. Finally I showed batching of changes where the client can queue up a number of changes to send as a batch to the server.
- Printing for Silverlight - While this is a cool and often requested scenario in itself, I used this scenario as a way to show how you can reuse your application logic you wrote for your Silverlight client app to also do server-side rendering to produce HTML, using the familiar ASP.NET DataSource control model.
- Ajax client - Once again an example to show reuse of the application logic from an Ajax client. Specifically this shows how the infrastructure we're building between the client and server is based on open, standard and RESTful principles and approaches, so it is consumable from a non-.NET client, such as a jQuery-based Ajax app.
- Azure backend - This demo showed the pattern of writing application logic scale to beyond local relational databases and work in the same manner for something like cloud-based storage. For this I had a sample scenario demonstrating a bookshelf, and the books stored on Azure. The client application used an Accordion control, which is new in the Silverlight control toolkit to simulate a bookshelf. This demo is based on prototype code to access the Azure storage. You'll also need an actual azure token and need to update the web.config with your information in the connectionStrings section to run the demo on your machine.
- Offline - this was probably the most exciting demo. It showed how you can implement an app that can now run outside the browser, thanks to the new Silverlight 3 feature, but use the .NE T RIA Services pattern to bring data down to the client, store it along with pending changes to local storage, and periodically, as and when the app has network connectivity, submit pending changes, and update the local cache of data. I should note that this demo is also based on early prototype code.
Two demos I didn't show due to time constraints, but included in the demo bits:
- Testability - I have a test project to test my application independent of my presentation tier by directly accessing the application logic and unit testing by mocking out the underlying data access layer. So specifically in my Azure app, I can test the app without relying on Azure at unit test time.
- Plain Old CLR Types - Our entire model isn't reliant on actual databased-backed data. This demo demonstrated writing some application logic on top of the list of running processes and publishing them to the client to report the longest running applications.
Posted on Thursday, 3/19/2009 @ 6:05 PM
| #
Silverlight