+ All Categories
Home > Technology > RESTful Data Services with the ADO.NET Data Services Framework

RESTful Data Services with the ADO.NET Data Services Framework

Date post: 07-Nov-2014
Category:
Upload: goodfriday
View: 3,703 times
Download: 1 times
Share this document with a friend
Description:
Learn how to use ADO.NET Data Services Framework to easily create and consume REST data services on the web. This session will cover the main concepts of the ADO.NET Data Services Framework (aka Project "Astoria"), show how to use it, and discuss how to use it with Microsoft's broader vision of a common interface for Windows Live and 3rd party services.
Popular Tags:
16
RESTful Data Services with the ADO.NET Data Services Framework Pablo Castro Software Architect Microsoft Corporation
Transcript
Page 1: RESTful Data Services with the ADO.NET Data Services Framework

RESTful Data Services with the ADO.NET Data Services FrameworkPablo CastroSoftware ArchitectMicrosoft Corporation

Page 2: RESTful Data Services with the ADO.NET Data Services Framework

1 Year Later…

Project “Astoria” first announced in Mix 2007

Shared early prototypes, got tons of feedback

Now we’re talking about the real dealProduction quality bits, real-word scenarios

We did a “transparent design” exerciseWent great!

Page 3: RESTful Data Services with the ADO.NET Data Services Framework

Data in the Web

HTML + Javascript

Data (XML,JSON,…)

DLL + XAML

Data (XML,JSON,…) Data (XML,JSON,…)

Mashup UI

Data Feeds

AJAX Applicatio

ns

Silverlight Applicatio

ns

Online Services

Mashups

Page 4: RESTful Data Services with the ADO.NET Data Services Framework

A RESTful Interface for Data

Just HTTP

• Data as resources, HTTP methods to act on it• Leverage caching, proxies, authentication, …

Uniform URL syntax

• Every piece of information is addressable• Predictable and flexible URL syntax

Multiple representations

• Use regular HTTP content-type negotiation• Atom*, JSON and Plain XML

• *full AtomPub protocol support

Page 5: RESTful Data Services with the ADO.NET Data Services Framework

Model and Operation Semantics

Underlying data modelEntity Data ModelEntities ResourcesAssociations Links

Operation semanticsUsual mapping of HTTP methodsGET retrieve resourcePOST create resourcePUT update resourceDELETE delete resource

Page 6: RESTful Data Services with the ADO.NET Data Services Framework

URL Conventions

Addressing entities and sets

Presentation options

Entity-set /Bookmarks

Single entity /Bookmarks(123)

Member access /Bookmarks(123)/Name

Link traversal /Bookmarks(123)/Tags

Deep access /Bookmarks(123)/Tags('abc')/Name

Raw value access /Bookmarks(123)/Names/$value

Sorting /Bookmarks?$orderby=Name

Filtering /Bookmarks?$filter=Created gt '2007-05-07'

Paging /Bookmarks?$top=10&$skip=30

Inline expansion /Bookmarks?$expand=Tags

Page 7: RESTful Data Services with the ADO.NET Data Services Framework

Data Access Layer

Creating Data Services

Create services directly from Visual Studio

Various data sourcesEntity FrameworkLINQ providers

Model-drivenStructural description in Entity Data ModelMetadata shapes service

Entity Framework

Custom LINQ

provider

Relational

databaseOther

sources

Service Runtime

Hosting/HTTP listener

HTTP

IQueryable [+ IUpdatable]

Page 8: RESTful Data Services with the ADO.NET Data Services Framework

Refining and Securing Services

Visibility

• Per-container visibility control• Read, Query and Write options

Authentication

• Integrate with hosting environment• ASP.NET, WCF or custom authentication schemes

Interceptors

• Execute before HTTP GET/PUT/POST/DELETE• Enable validation, custom row-level security policies• Maintain the REST interface

Service Operations

• Custom entry points, e.g. /MyTags?startDate='2007-01-01'• Composable, follow URI scheme

Page 9: RESTful Data Services with the ADO.NET Data Services Framework

Modern Data-Driven Web Apps

AJAX integrationAJAX-friendly JSON format in servicesJavascript library that integrates with the ASP.NET AJAX toolkit

Silverlight support.NET programming model for data servicesObject based, LINQ enabled APICode-gen entity types from metadata

Page 10: RESTful Data Services with the ADO.NET Data Services Framework

"Traditional" Applications

Web applicationsData services client can be used in ASP.NETASP.NET data source control for accessing remote services

Desktop applicationsFully-featured .NET client librarySame API in desktop and Silverlight environments

Page 11: RESTful Data Services with the ADO.NET Data Services Framework

Readmap & Summary

Where do we go from here?Beta 1 will ship in a few weeks

We sneaked a current build in the Mix DVD ;-)

RTM mid-2008

In summary…Create and consume data services with a flexible RESTful interfaceGrowing unified ecosystem of libraries & toolsGive it a try! Feedback is welcome :)

Page 12: RESTful Data Services with the ADO.NET Data Services Framework

Looking Forward…

We’re looking at what we need to do next

“Astoria Offline” is one we’ve been exploringImagine if you could point to a data service and

say “take it offline”……we automatically create a SQL Server Compact

database and setup sync profiles for youThen you write a regular “local” application

…well, almost that easy ;-)Check out prototypes of this here at Mix

Page 13: RESTful Data Services with the ADO.NET Data Services Framework

Related Content at Mix 2008

SessionsIntroducing SQL Server Data ServicesAccessing Windows Live Services with AtomPubUsing the Microsoft Sync Framework and FeedSyncBuilding RESTful Real World Applications with the ADO.NET Data Services Framework

Also check out the hands-on labs!

Page 14: RESTful Data Services with the ADO.NET Data Services Framework

Resources

ADO.NET Data Services FrameworkSite: http://astoria.mslivelabs.comBlog: http://blogs.msdn.com/astoriateamForums: http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=1430&SiteID=1

Contact mehttp://blogs.msdn.com/[email protected]

Page 15: RESTful Data Services with the ADO.NET Data Services Framework

© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.

The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after

the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Page 16: RESTful Data Services with the ADO.NET Data Services Framework

Recommended