Nov
18
2009

A guide to new features of WCF RIA Services

This is an exciting day, everyone can now get their hands on the brand new WCF RIA Services.  Here is a quick guide to some of the new features in WCF RIA Services as well as my personal guidance on how you can use the new features.

The new name

OK, WCF RIA Services has now replaced .NET RIA Services. I know I have talked about the ADO.NET Data Services integration but it turns out that RIA Services has gone beyond that (it has gone plaid!) and it now fully a WCF service. By default, your DomainService is now exposed as a standard WCF service using binary encoding. Sweeeeet!

Stay tuned to Saurabh Pant's blog for more information on how WCF is used by WCF RIA Services.

New rules for Error Handling

This is probably the most important change to understand while converting to the new WCF RIA Services. If errors come back from a SubmitOperation, InvokeOperation, or LoadOperation and is not handled by us then an exception will be thrown. This stops the problem where people new to RIA Services try to Submit or Load and never get an error, they will now get an exception. This can be a breaking change if you have errors coming back from the server that you were not previously handling.

Compositional Hierarchy

This is a big change for people who need real parent/child hierarchies in their code. For example, with a compositional hierarchy the parent’s HasChanges will be true if the child has been changed. However, I think a question that needs to be answered is what the default setup should be. My guidance here is that if you need composition, use composition. If you don’t need composition, or if you don’t know if you need composition, then don’t use composition. The default no-composition model is more flexible and has the potential of having better performance.

Inheritance Support (VS2010 Only)

This has been one of my biggest feature requests. I am extremely happy to say that not only does WCF RIA Services support inheritance, but the team has gone way above and beyond the level of support that I would have been happy with. They really did an incredible job and it is a real testament that Microsoft is listening to us.

Presentation Model

This is huge addition to WCF RIA Services and I don’t think the potential for this feature is really fully understood yet. I think there is going to be a tendency by some people to think that “Best Practices” would be to always use PM for all entities. I don’t think this is the case, it is easy to replace a regular entity with a PM entity without having to change the client so I think the better model is to mix PMs in with regular entities as you need them.

Domain Data Source Changes

I am not an expert in the use of the DDS. Personally, I don’t use it but I know that a lot of people do. The new version of the DDS has the bugs worked out and some simplifications made. Stay tuned to Jeff Handley’s blogfor all of the details.

blog comments powered by Disqus

Month List