Upload
goodfriday
View
3.706
Download
1
Embed Size (px)
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.
Citation preview
RESTful Data Services with the ADO.NET Data Services FrameworkPablo CastroSoftware ArchitectMicrosoft Corporation
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!
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
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
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
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
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]
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
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
"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
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 :)
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
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!
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]
© 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.