Download presentation
Presentation is loading. Please wait.
1
Unlocking the secrets of REST with WCF
Glenn Block Blogs/msdn.com/gblock @gblock
2
REST, Definition vs Practice
REST by definition is clear In practice REST is a highly overloaded term REST in practice means over HTTP
3
Richardson’s HTTP Maturity model
Hypermedia HTTP URI
4
Level 0 – Single URI / Single Verb
SOAP Envelope (POST) Create Update \OrderService.svc Order System Submit Delete Cancel Approve Find
5
Level 1 – Multi URI / Single Verb
XML/JSON – GET Create Orders/Create Update Orders/Update Order System Submit Orders/Submit Delete Orders/Delete Cancel Orders/Cancel Approve Orders/Approve Find Orders/Find
6
Level 2 – Multi URI / Multi Verb
XML/JSON/ATOM PUT Orders/ POST Orders/1234 POST Order System Orders/Submitted DELETE Orders/1234 POST Orders/Cancelled POST Orders/Approved GET Orders/1234
7
Level 2 – Hypermedia aware
Custom media types GET Orders/ <link rel=“Update” …/> Orders/1234 <link rel=“Submit” …/> Order System Orders/Submitted <link rel=“Delete” …/> Orders/1234 <link rel=“Cancel” …/> Orders/Cancelled <link rel=“Approve” …/> Orders/Approved <link rel=“View” …/> Orders/1234
8
Hypermedia what? HTTP/1.1 200 OK Content-Length: 421
Content-Type: application/vnd.ConstosoOrders+xml Date: Sun, 3 May :22:11 GMT <order xmlns=" xlmns:atom=" <OrderID>1234</OrderID> <-- Order details --/> <link rel=“Submit” href=“ <link rel=“Delete” href=“ <link rel=“Cancel” href=“ <link rel=“Approve” href=“ <link rel=“View” href=“ </order>
9
Browser Devices WCF Silverlight Desktop Reach any client
WCF already supports exposing services over HTTP. We have heard for you that is a good start but you want us to go further Desktop
10
Code is easier to maintain
Service Separation of concerns Testability "Raw" HTTP HTTP Concerns Simplified Configuration
11
Separating out HTTP and other concerns
Application concerns / CLR Objects Handler HTTP Message Operation Low Level HTTP specific concerns / HTTP Only Http Channel HTTP Message
12
Stay up to date with MSDN Belux
Register for our newsletters and stay up to date: Technical updates Event announcements and registration Top downloads Follow our blog Join us on Facebook LinkedIn: Download MSDN/TechNet Desktop Gadget Please keep this slide
13
TechDays On-Demand Watch this session on-demand via Channel9 Download to your favorite MP3 or video player Get access to slides and recommended resources by the speakers
14
THANK YOU
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.