Wcf – RIA Services versus WCF Services

silverlightwcfwcf-ria-services

I'm rewriting an LOB application whose architecture is like this:

Silverlight && Windows Mobile -> WCF
-> Entity Framework -> Database.

The mobile app was supposed to be able to do certain things as the silverlight app. What benefits would I get from using RIA Services here? Whats the advantage and disadvantage of RIA Services over WCF?

Best Answer

.NET RIA Services was created for Silverlight that runs in the browser. Silverlight is running a special version of the the .NET framework and in an N-tier application Silverlight is unable to share assemblies with the server side. By employing some clever code generation .NET RIA Services makes this gap almost invisible to the developer. Classes similar to the domain classes are code generated on the client side, and ways to move objects back and forth between client and server are also made available.

You will probably be able to call into a .NET RIA Service from Windows Mobile, but I don't think it will particular easy and currently you may in fact have to reverse engineer what's sent on the wire (JSON is used). WCF on the other has a much more broad scope, but doesn't support Silverlight development in the same way that .NET RIA Services does.

If you are writing a Silverlight only N-tier application .NET RIA Services are very powerful. If however Silverlight is only one of several clients WCF is probably a better choice.

Please note the .NET RIA Services hasn't been released yet, but a preview is available for download.

Related Topic