Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RIA Services vs ADO.NET Data 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?

like image 589
Cody C Avatar asked Jun 10 '09 17:06

Cody C


People also ask

What is Microsoft ADO.NET data services?

ADO.NET is a set of classes that expose data access services for . NET Framework programmers. ADO.NET provides a rich set of components for creating distributed, data-sharing applications. It is an integral part of the . NET Framework, providing access to relational, XML, and application data.

Is ADO.NET obsolete?

It isn't obsolete, it is the foundation for working with databases in . NET. It certainly is the archaic way of accessing a database though..

What is the use of WCF RIA Services?

WCF RIA Services simplifies the development of n-tier solutions for Rich Internet Applications (RIA), such as Silverlight applications. A common problem when developing n-tier RIA solutions is to coordinate the application logic between the middle tier and the presentation tier.

Is ADO and ADO.NET same?

In ADO, data is represented by a RecordSet object, which can hold data from one data source at a time. In ADO.NET, data is represented by a DataSet object, which can hold data from various data sources, integrate it, and after combining all the data it can write it back to one or several data sources.


2 Answers

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

like image 140
vidalsasoon Avatar answered Oct 08 '22 01:10

vidalsasoon


This is very old question but would like to add a answer for readers.

Ria services is layer on top of ADO.net data services. Ria services use ADO.Net as base framework and adds layer for easy usage for UI library.

So question can be when use RIA Services and when use ADO.Net data services

like image 41
mamu Avatar answered Oct 07 '22 23:10

mamu