Presentation is loading. Please wait.

Presentation is loading. Please wait.

Background REST (Representational State Transfer) What does it mean to be RESTful? Why REST? WCF How does WCF support REST? What are the pieces we need.

Similar presentations


Presentation on theme: "Background REST (Representational State Transfer) What does it mean to be RESTful? Why REST? WCF How does WCF support REST? What are the pieces we need."— Presentation transcript:

1

2 Background REST (Representational State Transfer) What does it mean to be RESTful? Why REST? WCF How does WCF support REST? What are the pieces we need to add? Chess A RESTful Chess API

3 Open Your API – 2005 MySpace API roadmap Where are we today ? developer.myspace.com

4 Public interface for 3rd party clients and partners to view, add, update, delete data. Easily consumable by any client Follows established industry standards Needs to be highly scalable Supports different data interchange formats Moderately securable

5 Tests we did…. WCFREST

6 Power combo: URI and HTTP Method Addressable, hierarchical URIs represent the entities or objects on your API HTTP Method represents the action to be taken on the resource Connectedness and Discoverability Like the Web, Http Responses contain links to other resources Roy Fielding dissertation http://www.ics.uci.edu/~fielding/pubs/dissert ation/top.htm http://www.ics.uci.edu/~fielding/pubs/dissert ation/top.htm http://www.ics.uci.edu/~fielding/pubs/dissert ation/top.htm

7 Benefits of REST for Web APIs Low barrier of entry ROA follows Web Semantics…convenient for Web Service APIs. Flexibility in Response formats REST is best choice when creating a general API when clients are unknown

8

9 URI Templates & WebGet/WebInvoke Attribute based definitions of URI template and HTTP method provide mapping of incoming request URIs to methods WebHttpBinding The binding that enables above WebOperationContext For more information: Building Applications and Services with.NET Framework 3.5 San Polo 3501A, M10:15 AM March 6 th

10

11 Flexible URIs Bridging Low REST clients Request Authentication via Digital Signing Extending WebOperationContext Multiple Representation Formats RESTful Exception Handling

12 Service.svc extension Required when hosting a WCF service in IIS Cant use custom extensions in templates What if I want to let the URI extension define the representation format?

13 Use URL Rewriter implemented as an HttpModule Add.svc service file to incoming request URI Use extension format in path hierarchy and rewrite URI accordingly

14

15 High: support for full set of HTTP methods Low: only support GET and POST Allow clients to override HTTP method Using X-HTTPMethodOverride header Use of _method query parameter Extending WCF…Channels to the Rescue

16

17 Introducing OAuth Standards based API authentication Standard access delegation between Consumer and Provider Standard digital signing mechanism oauth.net

18 WCF Custom Channels to the rescue again Channel will authenticate request before method dispatch Extend Context with application data

19

20

21 MySpace Development Platform is RESTful WCF is a powerful web API development platform WCF has great extension points All demo source available at RestChess.com MySpace APIs are available Visit developer.myspace.com

22 © 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.

23


Download ppt "Background REST (Representational State Transfer) What does it mean to be RESTful? Why REST? WCF How does WCF support REST? What are the pieces we need."

Similar presentations


Ads by Google