.net – RIA Services versus WCF services: what is a difference

netsilverlightwcfwcf-ria-services

There are a lot of information how to build Silverlight application using .NET RIA services, but it isn't clear what is unique thing in RIA that is absent in WCF?

Here are few topics that are talking around this topic: [1], [2]

But they doesn't give an answer to the question.

Sorry for the stupid question, but what does RIA Services layer bring into your app if you already have Silverlight <--> WCF Service <--> Business Logic <--> Entity Framework Model <--> Database? Authentication? Validation? Is it relly asset for you?

At the moment the only thing I see: with RIA services usage you don't need to host WCF service manually and don't need to configure any references on the client side (clien side == Silverlight application).

Probably I don't know some very useful features of the RIA Services? So could you please point me to the good doc for that?

Many thanks.

P.S. I've read a lot of different articles about differences, but can't clarify it… all articles "tell around" and aren't concrete. If you are going to give me a link to additional article, could you please be so kind and provide a list of benefits that YOU see.

Best Answer

Actually, you can use the same validation and authentication without using RIA Services. What RIA Services gives you is code generation. It creates your classes for you. You only need to put the business logic. I think RIA Services is very useful for developing small to mid apps very rapidly.

Another difference is that it hides the asynchronous calls to the web service. Many people don't like the async model (which is the only one you can use in Silverlight) and RIA services handles that for you.

I recommend reading this article from Shawn Wildermuth where he points out the pros and cons from both approaches and also includes ADO.NET data services (which is now called WCF Data Services, I think):

http://wildermuth.com/2009/09/29/Choosing_a_Data_Access_Layer_for_Silverlight_3