Creating a RESTful API with Windows Communication Foundation

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    Creating a RESTful API with Windows Communication Foundation - Presentation Transcript

    1. 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
    2. Open Your API – 2005 MySpace API roadmap Where are we today ? developer.myspace.com
    3. 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
    4. Test’s we did…. WCF REST
    5. What does it mean to be RESTful? 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
    6. 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
    7. The “Web Programming Model” 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 6th
    8. The 20% Flexible URIs Bridging Low REST clients Request Authentication via Digital Signing Extending WebOperationContext Multiple Representation Formats RESTful Exception Handling
    9. Problems… Service .svc extension Required when hosting a WCF service in IIS Can’t use custom extensions in templates What if I want to let the URI extension define the representation format?
    10. Solutions… 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
    11. 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
    12. OAuth Introducing OAuth Standards based API authentication Standard access delegation between Consumer and Provider Standard digital signing mechanism oauth.net
    13. OAuth WCF Custom Channels to the rescue again Channel will authenticate request before method dispatch Extend Context with application data
    14. 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 API’s are available Visit developer.myspace.com
    15. © 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.

    + goodfridaygoodfriday, 9 months ago

    custom

    508 views, 0 favs, 0 embeds more stats

    Learn how MySpace used Windows Communication Founda more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 508
      • 508 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 10
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories