Monday, August 4, 2008

ADO .NET Data Services for Web aka Astoria :

ADO .NET Data Services for Web aka Astoria :

The present era of web applications are built on technologies like Ajax and Silverlight enhancing the user experience. This has resulted in an obvious separation of presentation (UI) and data itself.

ADO .NET Data Services is a specialized WCF service that contains combinations of patterns and libraries that can be consumed by rich web clients there by keeping the separation between UI and Data intact. One question that would strike us is why do we need Astoria? Doesn’t WCF service also keep the separations intact? What more can Astoria give to a developer? Answering the above questions, as told Astoria is a specialized WCF service and the data is exposed as URI’s that points to data and is represented by simple formats like JSON and ATOM. This URI formats allows for simple queries to be formulated also has grater support for manipulating the presentation of the results like sorting, paging and expanding related resources. Also provides mechanism to point to every resource or member of a resource in the system.

The support of ADO.NET Data Services is provided in the ASP.NET 3.5 Extensions Preview which is a new preview of new functionality being added to ASP.NET 3.5 and ADO.NET. This preview includes ASP.NET MVC, ASP.NET MVC, ASP.NET Dynamic Data, ASP.NET controls for Silverlight, ADO.NET Data Services, Entity Framework runtime, and new features for ASP.NET AJAX. To know more about the other contents included in this preview version you can refer this link http://www.asp.net/downloads/3.5-extensions/.

To make data available to loosely coupled systems, we need to use a protocol that defines the interaction between the service and the client using it that too in an understandable format. The protocol used to leverage the most of Astoria is the HTTP protocol with JSON and APP/ATOM formats. Many of the APP and Atom concepts map well with the Astoria concept of exposing data. Also does HTTP gels with APP for manipulating data( adding, deleting, updating) which is the default protocol used in Astoria. And if we speak about JSON, it makes it easy to consume the results of services Js environments like web browsers.

ADO.NET Data Services consume a conceptual model representing the entities and its associations that the applications is likely to expose and exposes them as HTTP resource identified by a URI. The conceptual model is defined using Entity Data Model (EDM) proved by Entity Framework. While modeling this data you could analyze a scenarios, that is you are exposing the conceptual view of the data stored in the database as the Astoria well integrates with the Entity Framework.

To know more about the Entity framework along with the Entity Data Model(EDM) you could go through this reference link :
http://msdn2.microsoft.com/en-us/library/aa697427(VS.80).aspx.


Now the questions that would come to your mind would be How to create An Entity Data Model? How to create an ADO.NET Data Service? How To consume the same ? Etc….. Our next Blog would talk about this in detail…….

No comments: