Why ADO.NET Data Services Framework (aka Astoria)?
I’ve responded to a few posts on our online forums asking what the motivations were for building Astoria. After one of our recent posts to the forums a comment was left that the replies would be a good blog post. So, what follows is a few of my responses to those forums questions appended together and touched up a bit so they can be read together as a single post.
1)Creating and maintaining rich data oriented services with current approaches requires a significant developer investment
2) Building generation purpose client libs/tools with current approaches to data centric services is hard
For #1, imagine you wanted to expose the data in your CRM database to you client tier application. Further assume you want to enable typical application scenarios like retrieving sorted views of the data, paging over the data, filtering, etc. To expose this data as a set of callable remote methods (using current approaches to developing web services) you would need to write a large number of methods to expose each of the entities in your CRM DB (customers, orders, etc) and then add additional methods for each to retrieve entities by key, sort them, page over them, etc etc. ADO.NET Data Services, addresses this issue by allowing you to declaratively state the contract of such a data centric service, by telling us the schema of the data and having the data services technology automatically create the required remote endpoints, enabling paging, sorting, etc with no code from the developer. Then as you change your data model, your service endpoints also change.
For #2 above, an interesting artifact of a REST-based approach to web services is that it promotes creating a uniform interface. That is, how you address items in an ADO.NET Data Service (i.e. how to construct URIs), how to interact with data (using HTTP verbs), etc is the same across any ADO.NET Data Service, regardless of the data it exposes. This uniform interface enables code reuse against your web services such that one can create reusable client libraries and UI widgets for all their services. For example, the ADO.NET Data Service team is doing this by shipping .NET , Silver light, AJAX, etc libraries which can talk to any data service. In addition, this feature (uniform interface) enables us to add features such as LINQ to ADO.NET Data Services since the translation of LINQ query statements to URIs is stable and well known.
So far I’ve talked mainly about how Astoria fits into the mid-tier and makes aspects of app development easier for AJAX/RIA/etc developers. Another key trend that drove us to build the ADO.NET Data Services Framework was the observation that an ever increasing amount of data is being stored in the cloud and web-based APIs to access that data seem to be growing by the minute. A goal ADO.NET Data Services Framework is to fit into this use case by providing a way of easily creating a service that has a RESTful API and a uniform interface that plays well with libraries and tools just like in the app (AJAX, Silverlight, etc) use case described above.
This post is already getting a bit long, but in addition to the items noted above, additional advantages of REST-based approaches also apply such as rich integration with HTTP such that you can leverage existing HTTP infrastructure (ex. HTTP Proxies) deployed at large .
After writing this, I couldn’t help but wonder how this aligns with the general view the developer community has of Astoria now that we have released a few CTPs and everyone can try out the bits first hand. After reading this post, did this describe your overall view of Astoria and its target use cases?
– Mike Flasko
Program Manager, ADO.NET Data Services Framework