Download presentation
Presentation is loading. Please wait.
Published byCalvin Manning Modified over 9 years ago
1
MID307
4
Article source: http://digitallife.today.com/_news /2011/05/02/6569632-facebook- marriage-killer?gt1=43001 http://digitallife.today.com/_news /2011/05/02/6569632-facebook- marriage-killer?gt1=43001
6
“The Server”
7
Traditional Web Service
8
Howard Dierking http://www.flickr.com/ photos/belisario/2723 280407/
9
ProductResource http://myhost/product/ ProductResource http://myhost/product/ GET POST GET (id) PUT (id) DELETE (id) GET http://restcartwcf4/products POST http://restcartwcf4/products GET http://restcartwcf4/products/1 PUT http://restcartwcf4/products/1 DELETE http://restcartwcf4/products/1
10
Demo
11
http://www.flickr.com/ photos/alexgoy/3289 023107/ http://www.flickr.com/ photos/diwong/45532 64432/
12
HTTP/1.1 200 OK Cache-Control: private Content-Length: 553 Content-Type: application/json; charset=utf-8 { "description":"Erik Evans magnum opus on DDD", "links":null,"name":"Domain Driven Design", "price":59.99,"productNumber":"200", "quantityOnHand":1 } ProductResource http://myhost/product/ ProductResource http://myhost/product/ GET POST GET (id) PUT (id) DELETE (id) GET http://myhost/product/1 Accept: application/json GET http://myhost/product/1 Accept: application/json HTTP/1.1 200 OK Content-Type: application/json HTTP/1.1 200 OK Content-Type: application/json
13
Demo
14
What did he just say? http://www.flickr.co m/photos/mindonfir e/2881787072/
15
GET http://myhost/product/1 HTTP/1.1 304 Not Modified GET http://myhost/product/1 If-None-Match: “1” GET http://myhost/product/1 If-None-Match: “1” HTTP/1.1 304 Not Modified 2 2 3 3 GET http://myhost/product/1 HTTP/1.1 200 OK Cache-Control: max-age=60 Etag:“1”... HTTP/1.1 200 OK Cache-Control: max-age=60 Etag:“1”... 1 1 ProductResource http://myhost/product/ ProductResource http://myhost/product/ GET POST GET (id) PUT (id) DELETE (id) GET (id)
16
PUT http://myhost/product/1 If-Match: “1” PUT http://myhost/product/1 If-Match: “1” HTTP/1.1 200 OK Etag: “2”... HTTP/1.1 200 OK Etag: “2”... PUT http://myhost/product/1 If-Match: “1” PUT http://myhost/product/1 If-Match: “1” HTTP/1.1 412 Precondition Failed GET http://myhost/product/1 HTTP/1.1 200 OK Etag: “2” HTTP/1.1 200 OK Etag: “2” PUT http://myhost/product/1 If-Match: “2” PUT http://myhost/product/1 If-Match: “2” HTTP/1.1 200 OK Etag: “8”... HTTP/1.1 200 OK Etag: “8”... 1 1 2 2 3 3 4 4 ProductResource http://myhost/product/ ProductResource http://myhost/product/ GET POST GET (id) PUT (id) DELETE (id) GET (id) PUT (id)
17
Demo
18
http://www.flickr.com/photos/albinoflea/233362073/
19
GET http://myhost/product/ Accept: application/atom+xml GET http://myhost/product/ Accept: application/atom+xml GET http://myhost/product/1 HTTP/1.1 200 OK All Products All my products ProductsFeed 2011-05-10T22:30:30-07:00 2 Domain Driven Design 2011-05-10T22:30:30-07:00... 1 1 2 2 ProductResource http://myhost/product/ ProductResource http://myhost/product/ GET POST GET (id) PUT (id) DELETE (id) GET GET (id)
20
Demo
21
http://www.flickr.com/ph otos/x- ray_delta_one/424640 0843/
22
Demo
25
Required Slide Speakers, please list the Breakout Sessions, Interactive Discussions, Labs, Demo Stations and Certification Exam that relate to your session. Also indicate when they can find you staffing in the TLC.
26
Required Slide Track PMs will supply the content for this slide, which will be inserted during the final scrub.
27
www.microsoft.com/teched Sessions On-Demand & CommunityMicrosoft Certification & Training Resources Resources for IT ProfessionalsResources for Developers www.microsoft.com/learning http://microsoft.com/technet http://microsoft.com/msdn http://northamerica.msteched.com Connect. Share. Discuss.
29
Scan the Tag to evaluate this session now on myTechEd Mobile
32
.NET Framework 3.0 No support for REST – SOAP only.NET Framework 3.5 Basic infrastructure for non-SOAP HTTP services REST Starter Kit Preview 1 Visual Studio templates for RESTful services Request interceptors REST Starter Kit Preview 2 HTTP client library.NET Framework 4.0 ASPNET routes integration Automatic content negotiation
33
Level 3: HypermediaLevel 2: HTTPLevel 1: URIs Level 0: Web Services Richardson’s HTTP maturity model
34
CartService.svc GetCart() ClearCart() UpdateCartItem(itemId, Qty) RemoveCartItem(itemId) AddCartItem(itemId, Qty) ApplyShippingInfo (shippingOption, shippingAddress) ApplyShippingInfo (shippingOption, shippingAddress) ApplyBillingInfo(billingAddress, paymentType, paymentInfo) … … POST http://localhost/CartService.svc HTTP/1.1 Content-Type: text/xml; charset=utf-8 SOAPAction: "GetCart" Content-Length: 154 <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <GetCart xmlns="http://samples.microsoft.com/wcf/restcart"/> HTTP/1.1 200 OK Content-Length: 984 Content-Type: text/xml; charset=utf-8 Date: Tue, 26 Apr 2011 01:22:53 GMT 2011-04-25T18:22:53.5759314-07:00 Product 1 1 2 5 2.5 2011-04-25T18:22:53.5759314-07:00... POST http://localhost/CartService.svc SOAPAction: "GetCart" 200 OK Content-Type: text/xml 2011-04-25T18:22:53.5759314-07:00
35
CartService.svc GetCart() ClearCart() UpdateCartItem(itemId, Qty) RemoveCartItem(itemId) AddCartItem(itemId, Qty) ApplyShippingInfo (shippingOption, shippingAddress) ApplyShippingInfo (shippingOption, shippingAddress) ApplyBillingInfo(billingAddress, paymentType, paymentInfo) … … POST http://localhost/CartService.svc HTTP/1.1 Content-Type: text/xml; charset=utf-8 SOAPAction: "GetCart" Content-Length: 154 <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <GetCart xmlns="http://samples.microsoft.com/wcf/restcart"/> HTTP/1.1 500 Internal Server Error Content-Length: 734 Content-Type: text/xml; charset=utf-8 Date: Wed, 27 Apr 2011 00:15:00 GMT a:InternalServiceFault... 500 Internal Server Error a:InternalServiceFault... a:InternalServiceFault...
36
Demo
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.