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 ?
views:
225answers:
3Hi,
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.
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.
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.