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?
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.
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..
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.
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.
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
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With