views:

225

answers:

3

Since Silverlight 4 Microsoft recommends the usage WCF RIA services for business applications. Are there Silverlight scenarios, where the WCF RIA serives should no be used and plain WCF services or webservices or other techniques are the better choice ?

A: 

Hi,

from what I seen and heard WCF RIA Services pretty tightly couple with Silverlight at the moment. So if you want to expose business logic from the same service to other clients then it's probably better to go for standard WCF.

Grz, Kris.

XIII
Not at all actually. RIA Services allows you to expose an OData endpoint which is a completely open protocol with client and service implementations in many languages and technologies.http://www.odata.org/
free-dom
OData is used by WCF Data Services. Which is something else than WCF RIA Services. At the moment it seems it [will support OData in the future](http://jack.ukleja.com/wcf-data-services-vs-wcf-ria-services/).
XIII
@XIII - I know the difference between the two. RIA Services DOES support OData already (Which I know, because I use it), so I guess the "future" is now. Here's a short example of how to set it up: http://bit.ly/afZJhF
free-dom
@free-dom: thanks for the link.
XIII
@free-dom: I just put up a question related to the use of RIA with an OData endpoint - http://stackoverflow.com/questions/3136107/why-use-a-ria-services-link-instead-of-just-an-odata-endpoint. If RIA can expose an OData endpoint, why bother using a "RIA Services link"? It seems like having the one standard OData endpoint for all client types would be a big win.
nlawalker
+1  A: 

Of course Microsoft has been promoting the WCF Data Services as well. In this case data is exposed in form of atom+xml or JSON feeds and accessed with RESTful HTTP requests conforming to OData protocol. This is a valid alternative to WCF RIA Services. I would recommend using OData in client agnostic scenarios as a general rule. So if in addition to the Silverlight client you would like to build clients on other platforms like JavaScript, IPhone, Android or Excel (PowerPivot) then WCF Data Services is the way to go.

Przemek
WCF RIA Services exposes OData endpoints, and in my experience allow for more flexibility in customizing the service contracts and logic.
free-dom
+2  A: 

The reality is that WCF RIA Services are built on top of WCF. This means you can easily build an application that (through configuration) exposes several endpoints. So you can use RIA Services endpoints, and SOAP endpoints all in the same application with the same code base if thats what you need.

That way you can get the easiest path to integration with your Silverlight application, while other API users can get access to data in a way that is convenient for them.

Ultimately OData is probably your best choice as it's built into RIA Services (just hit the checkbox!) and it's an open published standard.

free-dom