RIA Services vs ADO.NET Data Services

.net-3.5silverlight-3.0wcf-data-serviceswcf-ria-services

I'm currently in the process of creating a Silverlight 3 data driven application. To access the database, 2 common approaches are used: RIA Services and ADO.NET Data Services. Does anyone have any guidance on when/why to choose each approach? Here is what I've gathered from my research / experience. Any thoughts?

ADO.NET seems to be only useful for strictly database calls. If you need to expose the data services to other applications (ignoring Silverlight 3's domain restriction), this is a good approach. Also, if the URL/Query syntax can be useful in your application, this is another advantage

RIA Services seem to be a more flexible, accepted framework. It seems to give you more than strictly database access. It does have a limitation of only being used for the Silverlight / Web application as it is not exposed via a service.

Thoughts? Ideas? Comments?

Best Answer

Over the wire, ADO.NET data services and RIA services are very similar (they are both REST based).

However, with ADO.NET data services and all other REST services you get no easy to see API within Visual Studio. Ex: you dont know what calls to the database are available and the returned data is not strongly typed. It makes for a very interoperable data system but it can be a pain to work with.

With RIA services, you get the best of both worlds since your RIA project is referenced directly for silverlight projects so Visual Studio can know what methods are available and everything is strongly typed. All other apps can use this service (dataservice.axd) but they dont have the luxury of an API.

EDIT: Correction: ADO.NET Data Services does generate metadata (Sorry for bad info) http://msdn.microsoft.com/en-us/library/cc716656.aspx

Related Topic