RIA Services - v1 Shipped!

Celebrating shipping RIA Services v1...

"Those Who Ship, Win!"

RIA ServicesThis used to be written on a giant poster in the hallways of building 42 (original home of the .net framework) ... should have taken a picture of it while it used to be around. (missed classic photo opportunity - anyone have a shot of it?)

Today, we delivered one of the most important features, shipping a v1. Yes, WCF RIA Services v1 is done, and shipped! You can get the final build along with the final build of Silverlight 4 tools, right here on the RIA Services landing page, that also has links to blogs, tweets, docs, forums and all things RIA Services.

It has been an exciting ride building this technology from the ground-up, seeing people use it live even with early preview builds, and providing tons of feedback (thanks), and bringing credibility to Silverlight as a line of business application platform. It has also been an interesting learning experience for me personally in many dimensions.


The diagram below captures the essense - what can a framework do by redfining a Rich Internet Application as a single logical application that spans across client and server, and consumes as well as provides data and services. My original Vision to Architecture blog post still holds up a year or so later. I'll be doing a follow-up to that post, as well as updating my Book Club reference app with a couple of new features, so stay tuned.

A RIA Services Application


Celebrating with a look back...

Like any other interesting Microsoft project, RIA Services had its set of code names and project names - Rialto, Alexandria, RIA Services, .NET RIA Services and finally WCF RIA Services (there is usually some story behind each of the name changes - but that is for another day). At least we didn't end up with something like Windows LoB Foundation or some such insanity!

Dinesh and I got together with John for a casual Silverlight.TV recording to recollect some of the history and motivation for the project.


The road ahead...

We've taken the first step in simplifying RIA applications. As we look forward to the future, there are a number of interesting big and small things to do (eg. Ajax, Cloud, Mobile and more). We've set up a forum for suggesting ideas and features and voting on what you'd like to see happen. My top five (so far):

Go check out the forum and suggest your ideas. Just make sure you vote for some of the above five... :-)


I am eager to see how RIA Services impacts the .NET and Silverlight development landscape, and I'd love to hear what you folks build, and your interesting experiences.


Updated (minutes after): How could I forget? The excitement perhaps... you'll want to make sure you also get the RIA Services toolkit for related bits of goodness such as LINQ to SQL support, amongst a couple of other extra features.

Posted on Monday, 5/17/2010 @ 10:01 AM | #Silverlight


Comments

18 comments have been posted.

Ben Hayat

Posted on 5/17/2010 @ 11:52 AM
>>"Those Who Ship, Win!"<<

You guys have winners even before you shipped~! :-)

Didier

Posted on 5/17/2010 @ 12:41 PM
Hoorray!

Thank you for this.

Didier

Rick Arthur

Posted on 5/17/2010 @ 2:52 PM
Awesome product!

What would it take to get a Silverlight/RIA services demo app that does Inserts and Deletes? Funny as it sounds, none of the demo apps that Microsoft has released do Inserts and Deletes. Since this is a common scenario, would it be possible to get some kind of demo that shows the recommended pattern of how to do this?

Thanks

Nikhil Kothari

Posted on 5/17/2010 @ 3:52 PM
@Rick Arthur
Did you check out the Book Club sample I have used in conferences and in couple of recent blog posts, incl. the pointer to it in this blog post? It has those insert/delete. I'd recommend checking it out.

True deletes, as in deleting data from a database is rare in real apps. Typically data is tombstoned rather than getting rid of it completely. That said the beauty is from the client's perspective the operation might be a delete, and ria services allows you to implement back-end logic to either truly delete, or simply tombstone. Doesn't matter... that is an implementation detail of the server/business logic.

Per Grimskog

Posted on 5/17/2010 @ 5:54 PM
Thanks!
I'm very pleased that you released the first pre-release so early. It made it possible for us to start using WCF RIA early last year and saved so much time and effort!
And now when it's 'final' we can really get the final pieces tuned, thanks again!

John Kears

Posted on 5/17/2010 @ 8:25 PM
Well done team!
We have been working with this technology since July of 2009 and have witnessed its maturity and struggled with its changes.
One change that I remainl a little perplexed as to why it was done, was the removal of original values being returned on updates. I was utilizing the original values to audit all field level changes. Now I am needing to read the original values from disk in order to write out the audits. What was your reasoning to change this behavior from the Nov CTP release to now. Was this for performance reasons? In our applications, we usually submit at the point of data form edit submit, so its a pretty much just a few records that are sent back on an update and thus do not understand why this was removed. In a batch update this makes perfect sense, but not in a simple form update.

Santos Ray Victorero, II

Posted on 5/17/2010 @ 9:01 PM
Congrats!

Great bridge!

Thanks for continuing to improve this technology and for listening to the community.

Regards,

Santos

Nikhil Kothari

Posted on 5/18/2010 @ 12:06 AM
@John Kears
You've identified what might have been the most controversial change in behavior. The fact is the change was motivated when we thought through the OData scenario, but it applies beyond that.

In OData, ETags (the portion of the entity used to determine concurrency checks, and the bit that can be used to reconstitute original values) is computed when entities are queried and sent from the server to the client. It would be incorrect to bloat the ETag with a copy of the entire entity, i.e. all members. Only specific fields used for concurrency check by the DAL, or specific fields used by the business logic in the DomainService should be sent back. This requires the developer to step in by placing [Roundtrip] on members that need to be sent back... note we do infer what needs to be round-tripped by mapping DAL-specific concurrency metadata into [Roundtrip] automatically.

Some other scenarios where this matters:
- In ASP.NET DomainDataSource, fields need to be roundtripped via view state. We wouldn't want view state to be bloated.
- In the mainline Silverlight scenario, sometimes entities contain large blob/text fields that might not need roundtripping.
- Also in the mainline scenario, sometimes having the full original entity around might tempt the developer to base security-like checks by comparing against the original, when instead those checks should be performed by retrieving values from the db.

So bottomline, it overall seemed appropriate to change the behavior. In the end I think it is the right default, as one can always opt-in into more, and if the model instead was to opt-out, most developers wouldn't even realize they could/should. I think the biggest pain really was the change in behavior, as opposed to the new behavior itself, as the change either caused some breakages, or leaves some people perplexed. If we had an opt-in model from the get-go, I think it would be lessened the pain to some degree.

For your audit scenario, I agree you want the original values. Depending on your app you might need to audit specific members, and would need to add [Roundtrip] to just those members.

Hope that helps!

Osku

Posted on 5/19/2010 @ 6:44 AM
One thing that I would really like to see solution to is a way to utilize the functions of the DataForm from the toolkit on [include] EntityCollections, specifically the Add/Remove functions of the form. This also presents itself in the RadGrid from Telerik Radcontrols that I'm currently testing, using the DomainDataSource you automatically get Add/Delete functionality from the DataForm & RadGrid on the Master Table however the Include Tables are of EntityCollection and are only editable from these controls.

My current solution is a converter that converts the EntityCollection to a collection that implements ICollectionView and IEditableObject, and then use it on the ItemsSource on each of the EntityCollections inside the Master Table Item. It's not perfect and clearly not done yet but it's working on a small scale. If you could provide a solution to Master Detail situations where you could just throw in a grid/list with a itemssource which links its selecteditem to a dataform and inside the dataform you nestle a couple of more dataforms and list for the subtables without really doing any coding on the client side and still get complete CRUD operations for each separate table it would be perfect. At the moment this sadly only works on the main table that you select from the DomainDataSource.Data/DataView .

Calabonga

Posted on 5/19/2010 @ 2:00 PM
this is a realy good news, thanks!
very timely

Nikhil Kothari

Posted on 5/20/2010 @ 11:26 AM
@Osku
I'd suggest checking out my BookClub app - it isn't the exact same master/detail scenario, but it does show editing/inserting using a view model pattern instead, that I think is better than using collection views.

Essentially, you have a form, with ok/cancel buttons that invoke methods on the view model and that view model can then turn around and work against Entities, EntitySets, EntityCollections etc. all without using any collection views.

Hope that helps...

Aum

Posted on 5/25/2010 @ 2:46 AM
I have some problem that need somebody to solve it. I have used both VS2008 and VS2010 but when I installed the RIA Serivce for Silverlight 4, then the installer will be removed the previous version out of PC. I want to use RIA services in both of them. How can I do it?

JDM Parts

Posted on 6/1/2010 @ 2:33 PM
I am seriously interested to learn .Net.

Pat

Posted on 6/12/2010 @ 3:35 AM
Hi Nikhil. I've been reading through your blog and trying to come up to speed with RIA services recently in order to begin the design of an LoB application. Your articles have been really helpful so far, so first of all I wanted to say thanks.

I have one specific issue I'm trying to sort through and I hoped you might be able to provide some advice.

My application is cloud based and has a diverse set of clients (major companies). Each client requires the ability to have a tailored data model, however the main UI operates along the same pattern for all clients. To illustrate, let's assume there's just one (Entity) class involved, which looks like this for client #1 (highly simplified):

class Foo
{
Int32 x;
string y;
DateTime z;
}

For client #2, the class might look like this:

class Foo
{
Int32 x;
string y;
string a;
float b;
}

In essence, there's a common subset and a unique subset, associated with the same basic class. I also want to be able to pass the relevant meta-data to permit client-side validation etc., however I think that's a simpler problem in general (and your article on the meta-data pipeline gives me lots of ideas).

I intend to persist this using a "value as row" pattern, so there's no issue in the DAL. Where I'm a bit stuck is how to handle this in the face of the static typing assumption built into RIA services? My first approach was thinking I could use an ExpandoObject, but it seems that RIA services doesn't support that? I've since started thinking I could use a Dictionary to transport the variable members, and use CollectionDataContractAttribute or similar to help expose the data in a more horizontal fashion.

It's likely I'm on the wrong path - I'd appreciate any pointers.

Nikhil Kothari

Posted on 6/12/2010 @ 9:59 PM
@Pat
Your best bet is to define Foo with the fixed set of properties it always has, and then a Dictionary<string, object> for all the other variable list of values.

You'll need to do some work on the client to bind to this dictionary, not impossible, but a bit messy, as all the way up/down the entire stack, including UI controls/bindings, are optimized for statically defined types.

Pat

Posted on 6/13/2010 @ 1:05 AM
I thought that might be the case. Any suggestions regarding passing the validation and other meta-data associated with the Dictionary content in a way that'd be easily re-usable for the client-side binding etc?

Thanks for the feedback.

Nikhil Kothari

Posted on 6/13/2010 @ 3:21 PM
@Pat
There is no standard way, and Silverlight doesn't have the same extensibility mechanisms that would let you virtualize types/associated metadata etc. as you can on the desktop framework. I'd definitely urge you to go suggest/vote for features such as TypeDescriptor on the Silverlight user voice forum. Hearing from customers with scenarios like yours will help justify and make the case for implementing those features in Silverlight.

One possibility is using reflection emit on the client to generate types on the fly, but its a fair amount of work involved.

thekindofme

Posted on 7/7/2010 @ 5:13 AM
Awesome!
Post your comment and continue the discussion.