a ta Services Mike Flasko Program Manager Microsoft DTL327 Agenda Scenarios for Data Services RESTfulness Modeling Data Services Structure Security Behavior Caching Versioning ID: 388954
Download Presentation The PPT/PDF document "Modeling RESTful D" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1Slide2
Modeling RESTful Data Services
Mike Flasko
Program Manager
Microsoft
DTL327Slide3
AgendaScenarios for Data Services“RESTfulness”Modeling Data ServicesStructureSecurityBehaviorCachingVersioningWhat’s Next…Slide4
Scenarios for Data Services
DLL + XAML
Data (XML, etc)
Data (XML, etc)
Client-server designed and deployed together
Easy deployment
Functionality surfaces in user interface
Online Services
Loosely coupled clients and servers
Easy access
State, functionality through service interface
Data in RIA’s
Resource-centric:
GetCustomers
(),
GetOrders
(
customerID
)
OR
Operation-centric:
Authenticate(…)Slide5
REST-ish Service InterfacesSlide6
Creating a Resource-centric Service InterfaceService StructureSlide7
Service StructureFlexible interface! = database interfaceModel as appropriate for a service interfaceApplication-level conceptsLatency, payload size considerationsOptimize for cachingConsider optimistic concurrency requirementsServer-side schema versus service schemaAccess rights control service level schemaMaintain full model for server-side codeSlide8
Who can access the service?AuthenticationSlide9
AuthenticationConsider your target scenarioAJAX/Silverlight applications“Forms” authentication works wellLogin in HTML forms or within SilverlightWide-open RESTful service interfaceStandard schemes much more importantBasic + SSL is often “good enough”LiveID for account reuse“Integrated” is great for IntranetsSlide10
Who can do what with the service?Access ControlSlide11
Access ControlUse query and change interceptorsPolicies apply regardless of access pathQuery path is composition-based, highly efficientRole-based access controlFor actionsRow-level securityFor entitiesSlide12
Behaviors in a resource-centric interface?State-based BehaviorSlide13
Behavior on State TransitionsActions are modeled as state transitionsProcessSalesOrder() Order. Status=“Ready”Change interceptors to detect transitionsPerform secondary side-effectsKick-off workflows, etc.Methods are available if you need themMethods exposed as “service operations”Use the “CRUD litmus test” Slide14
Make Use of Widespread Infrastructure Using CachingSlide15
Utilizing Cache InfrastructureETags for more than concurrency checksUse conditional requestsBe careful with…Vary headerExpiration policyAuthentication affects cache policyEnsure client & server cache policies are setSlide16
Service VersioningProtocol and Schema VersioningSlide17
Versioning“Protocol” versioningAddressing, Serialization, Interaction modelData services includes versioning support “in the box”Service Schema VersioningAllow missing elementsPreserve unknown elementsWith significant change, version the endpoint Slide18
Service Schema VersioningSchema Changes Impact on Existing Clients Add non-required members Client unaffected (missing values are set to defaults) Add required members An exception is thrown for missing values. Remove non-required members Data lost at the service (exception thrown)Modify existing member If types are compatible no exception, butdata types may receive unexpected results Slide19
What's next…Short and Long Term PlansSlide20
ADO.NET Data Services v1.5Focused on service capabilitiesRow count – everybody asked for this :)Feed customizationBLOBs with streaming interface for mediaData-binding for the .NET & SilverlightServer-driven paging“Fancy” providers with full flexibilityInstalls without overwriting 1.0 runtimeCTP1 available now, RTM around this fallSlide21
SummaryYou can build fully functional RESTful services with ADO.NET Data ServicesBehaviors, access control, etc. can be modeled using a resource-centric interfaceWe are extending data services to provide more base functionalitySlide22
Related Content Breakout Sessions DAT308 Design Patterns for Application Architecture with the ADO.NET Entity FrameworkDTL401 Applied Entity FrameworkDTL312 The ADO.NET Entity Framework: Tips and TricksAnd more…Slide23
DTL Track ResourcesVisit the DPR TLC for a chance to win a copy of Visual Studio Team Suite. Daily drawing occurs every day in the TLC at 4:15pm. Stop by for a raffle ticket.http://www.microsoft.com/visualstudio http://www.microsoft.com/visualstudio/en-us/products/teamsystem/default.mspxPlease visit us in the TLC blue area
Slide24
www.microsoft.com/teched
Sessions On-Demand & Community
http://microsoft.com/technet
Resources for IT Professionals
http://microsoft.com/msdn
Resources for Developers
www.microsoft.com/learning
Microsoft Certification and Training
R
esources
www.microsoft.com/learning
Microsoft Certification & Training Resources
ResourcesSlide25
Complete an evaluation on
CommNet
and enter to win!Slide26
© 2009 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.