RESTful Services for the Programmable Web 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

    1 Favorite

    RESTful Services for the Programmable Web with Windows Communication Foundation - Presentation Transcript

    1. The Web of Services should work the way the Web of Pages works
    2. RESTfullness HI-REST LO-REST URI HTTP verbs Semantics Formats
    3. SOAP/WS-* Industrial Strength Complex Powerful Difficult Specifications
    4. REST Simple Light Weight Good Enough Less Functional Freedom
    5. Resources
    6. public class SessionData { public string ID { get; set; } public string Title { get; set; } public string Speaker { get; set; } }
    7. URI Resources
    8. URI Template HTTP Operation Method Session.svc/ GET Get all sessions Session.svc/{id} GET Get one session Session.svc/ POST Add a new session Session.svc/{id} PUT Update a session Session.svc/{id} DELETE Delete
    9. Service URI Resources
    10. public class Session { SessionData GetSession(string id) { return _sessions[id]; } }
    11. [ServiceContract] public class Session { [OperationContract] SessionData GetSession(string id) { return _sessions[id]; } } Note: This is a SOAP Service
    12. [ServiceContract] public class Session { [OperationContract] [WebGet] SessionData GetSession(string id) { return _sessions[id]; } Address } http://localhost/Session.svc/GetSession?id=123
    13. [ServiceContract] public class Session { [OperationContract] [WebGet(UriTemplate=\"session/{id}\"] SessionData GetSession(string id) { return _sessions[id]; } } Address http://localhost/Session.svc/session/123
    14. <%@ ServiceHost Language=\"C#\" Debug=\"true\" Service=\"Conference.Session\" CodeBehind=\"Session.svc.cs\" Factory=\"System.ServiceModel.Activation. WebServiceHostFactory\" %> No <System.ServiceModel> in web.config!
    15. <configuration> <system.serviceModel> <serviceHostingEnvironment> <serviceActivations> <add virtualPath=\"~/wines” factory= \"System.ServiceModel.Activation. WebServiceHostFactory” service=“CohoWinery.Wines\"/> Microsoft Confidential
    16. http://msdn.microsoft.com/wcf/rest http://code.msdn.microsoft.com/wcfrestlabs
    17. © 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.

    + goodfridaygoodfriday, 8 months ago

    custom

    838 views, 1 favs, 0 embeds more stats

    Services are needed to light up the Web, and Window more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 838
      • 838 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 1
    • Downloads 18
    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