designing http interfaces and restful web services · the rise of web services ohai, i'm ur...
TRANSCRIPT
![Page 1: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/1.jpg)
DESIGNING HTTP INTERFACESAND RESTFUL WEB SERVICES
![Page 2: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/2.jpg)
David Zuelke
![Page 3: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/3.jpg)
David Zülke
![Page 4: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/4.jpg)
![Page 5: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/5.jpg)
http://en.wikipedia.org/wiki/File:München_Panorama.JPG
![Page 6: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/6.jpg)
Founder
![Page 8: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/8.jpg)
Lead Developer
![Page 11: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/11.jpg)
THE OLDEN DAYSBefore REST was En Vogue
![Page 12: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/12.jpg)
http://www.acme.com/index.php?action=zomg&page=lol
![Page 13: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/13.jpg)
along came
![Page 14: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/14.jpg)
dis is srs SEO bsns
![Page 15: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/15.jpg)
and said
![Page 16: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/16.jpg)
NEIN NEIN NEIN NEIN
DAS IST VERBOTEN
![Page 17: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/17.jpg)
at least if they were
![Page 18: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/18.jpg)
![Page 19: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/19.jpg)
so we had to make URLs "SEO friendly"
![Page 20: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/20.jpg)
http://www.acme.com/zomg/lol
![Page 21: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/21.jpg)
and then things got out of control
![Page 22: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/22.jpg)
because nobody really had a clue
![Page 23: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/23.jpg)
http://acme.com/videos/latest/hamburgers
![Page 24: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/24.jpg)
http://acme.com/search/lolcats/pictures/yes/1/200
![Page 25: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/25.jpg)
oh dear…
![Page 26: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/26.jpg)
THE RISE OF WEB SERVICESOhai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?
![Page 27: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/27.jpg)
POST /soapendpoint.php HTTP/1.1Host: localhostContent-‐Type: text/xml; charset=utf-‐8
<?xml version="1.0" encoding="UTF-‐8"?><SOAP-‐ENV:Envelope xmlns:SOAP-‐ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-‐ENV:Body> <ns1:getProduct xmlns:ns1="http://agavi.org/sampleapp"> <id>123456</id> </ns1:getProduct> </SOAP-‐ENV:Body></SOAP-‐ENV:Envelope>
HTTP/1.1 200 OKContent-‐Type: text/xml; charset=utf-‐8
<?xml version="1.0" encoding="UTF-‐8"?><SOAP-‐ENV:Envelope xmlns:SOAP-‐ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-‐ENV:Body> <ns1:getProductResponse xmlns:ns1="http://agavi.org/sampleapp"> <product> <id>123456</id> <name>Red Stapler</name> <price>3.14</price> </product> </ns1:getProductResponse> </SOAP-‐ENV:Body></SOAP-‐ENV:Envelope>
![Page 28: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/28.jpg)
POST /soapendpoint.php HTTP/1.1Host: localhostContent-‐Type: text/xml; charset=utf-‐8
<?xml version="1.0" encoding="UTF-‐8"?><SOAP-‐ENV:Envelope xmlns:SOAP-‐ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-‐ENV:Body> <ns1:getProduct xmlns:ns1="http://agavi.org/sampleapp"> <id>987654</id> </ns1:getProduct> </SOAP-‐ENV:Body></SOAP-‐ENV:Envelope>
HTTP/1.1 500 Internal Service ErrorContent-‐Type: text/xml; charset=utf-‐8
<?xml version="1.0" encoding="UTF-‐8"?><SOAP-‐ENV:Envelope xmlns:SOAP-‐ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-‐ENV:Body> <SOAP-‐ENV:Fault> <faultcode>SOAP-‐ENV:Server</faultcode> <faultstring>Unknown Product </faultstring> </SOAP-‐ENV:Fault> </SOAP-‐ENV:Body></SOAP-‐ENV:Envelope>
![Page 29: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/29.jpg)
SOAP sucks, said everyone
![Page 30: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/30.jpg)
let's build APIs without the clutter, they said
![Page 32: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/32.jpg)
POST /api/talk HTTP/1.1Host: joind.inContent-‐Type: text/xml; charset=utf-‐8
<?xml version="1.0" encoding="UTF-‐8"?><request> <auth> <user>Chuck Norris</user> <pass>roundhousekick</pass> </auth> <action type="getdetail"> <talk_id>42</talk_id> </action></request>
HTTP/1.1 200 OKContent-‐Type: text/xml; charset=utf-‐8
<?xml version="1.0" encoding="UTF-‐8"?><response> <item> <talk_title>My Test Talk</talk_title> <talk_desc>This is a sample talk description</talk_desc> <ID>42</ID> </item></response>
![Page 33: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/33.jpg)
PROBLEMS WITH THIS API
• Always a POST
•Doesn't use HTTP Authentication
•Operation information is enclosed in the request ("getdetail")
•Nothing there is cacheable
• Everything through one endpoint (/api/talks for talks)
![Page 34: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/34.jpg)
Level 0 in the Richardson Maturity Model:Plain old XML over the wire in an RPC fashion
![Page 35: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/35.jpg)
Room for improvement: use one URI for each resource“ “
![Page 36: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/36.jpg)
That would be Level 1 in Richardson's Maturity Model
![Page 37: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/37.jpg)
Level 0 and Level 1 are a bag of hurt.Do not use them.
Ever.
![Page 38: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/38.jpg)
ALONG CAME ROY FIELDINGAnd Gave Us REST
![Page 39: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/39.jpg)
that was awesome
![Page 40: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/40.jpg)
because everyone could say
![Page 41: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/41.jpg)
I haz REST nao
![Page 42: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/42.jpg)
when in fact
![Page 43: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/43.jpg)
they bloody didn’t
![Page 44: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/44.jpg)
RESTWhat Does That Even Mean?
![Page 45: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/45.jpg)
REpresentational State Transfer
![Page 46: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/46.jpg)
Roy Thomas Fielding: Architectural styles andthe design of network based software architectures.
![Page 47: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/47.jpg)
• Client-Server
• Stateless
• Cacheable
• Layered System
• Code on Demand (optional)
• Uniform Interface
REST CONSTRAINTS
![Page 48: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/48.jpg)
• A URL identifies a Resource
•Methods perform operations on resources
• The operation is implicit and not part of the URL
• A hypermedia format is used to represent the data
• Link relations are used to navigate a service
UNIFORM INTERFACE
![Page 49: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/49.jpg)
a web page is not a resource
![Page 50: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/50.jpg)
it is a (complete) representation of a resource
![Page 51: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/51.jpg)
GET /products/ HTTP/1.1Host: acme.comAccept: application/json
HTTP/1.1 200 OKContent-‐Type: application/json; charset=utf-‐8Allow: GET, POST
[ { id: 1234, name: "Red Stapler", price: 3.14, location: "http://acme.com/products/1234" }]
GETTING JSON BACK
![Page 52: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/52.jpg)
GET /products/ HTTP/1.1Host: acme.comAccept: application/xml
HTTP/1.1 200 OKContent-‐Type: application/xml; charset=utf-‐8Allow: GET, POST
<?xml version="1.0" encoding="utf-‐8"?><products xmlns="urn:com.acme.products" xmlns:xl="http://www.w3.org/1999/xlink"> <product id="1234" xl:type="simple" xl:href="http://acme.com/products/1234"> <name>Red Stapler</name> <price currency="EUR">3.14</price> </product></products>
GETTING XML BACK
![Page 53: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/53.jpg)
but those are not hypermedia formats!
![Page 54: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/54.jpg)
(more on that a bit later)
![Page 55: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/55.jpg)
GET /products/ HTTP/1.1Host: acme.comAccept: application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,*/*;q=0.5User-‐Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-‐us) AppleWebKit…
HTTP/1.1 200 OKContent-‐Type: text/html; charset=utf-‐8Allow: GET, POST
<html lang="en"> <head> <meta http-‐equiv="Content-‐Type" content="text/html; charset=UTF-‐8"></meta> <title>ACME Inc. Products</title> </head> <body> <h1>Our Incredible Products</h1> <ul id="products"> <li><a href="http://acme.com/products/1234">Red Stapler</a> (€3.14)</li> </ul> </body></html>
AND FINALLY, HTML
![Page 56: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/56.jpg)
VOLUME ONEDesigning an HTTP Interface
![Page 57: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/57.jpg)
FIRST: DEFINE RESOURCESA Good Approach: Structure Your URLs
![Page 58: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/58.jpg)
BAD URLS
• http://www.acme.com/product/
• http://www.acme.com/product/filter/cats/desc
• http://www.acme.com/product/1234
• http://www.acme.com/photos/product/1234
• http://www.acme.com/photos/product/1234/new
• http://www.acme.com/photos/product/1234/5678
WTF?
photo or product ID?
new what?
![Page 59: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/59.jpg)
GOOD URLS
• http://www.acme.com/products/
• http://www.acme.com/products/?filter=cats&sort=desc
• http://www.acme.com/products/1234
• http://www.acme.com/products/1234/photos/
• http://www.acme.com/products/1234/photos/?sort=latest
• http://www.acme.com/products/1234/photos/5678
a list of productsfiltering is a query
a single productall photos
![Page 60: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/60.jpg)
now here's the ironic part
![Page 61: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/61.jpg)
URLs don't matter once you have a fully RESTful interface
![Page 62: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/62.jpg)
but it’s helpful to think in terms of resources
![Page 63: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/63.jpg)
SECOND: USE RESOURCESCRUD, but not really
![Page 64: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/64.jpg)
COLLECTION OPERATIONS
• http://www.acme.com/products/
• GET to retrieve a list of products
• POST to create a new product
• returns
• 201 Created
• Location: http://www.acme.com/products/1235
![Page 65: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/65.jpg)
ITEM OPERATIONS
• http://www.acme.com/products/1234
• GET to retrieve
• PUT to update
•DELETE to, you guessed it, delete
![Page 66: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/66.jpg)
and remember
![Page 67: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/67.jpg)
don't let the server maintain client state (e.g. cookies)
![Page 68: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/68.jpg)
Now we are at Level 2 in RMM
![Page 69: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/69.jpg)
RMM LEVEL 2
• Use HTTP verbs
• GET (safe and idempotent)
• POST (unsafe, not idempotent)
• PUT & DELETE (unsafe, idempotent)
• Use HTTP status codes to indicate result success
• e.g. HTTP/1.1 409 Conflict
![Page 70: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/70.jpg)
THE TWITTER APINot RESTful, And Not Even Getting HTTP Right :(
![Page 71: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/71.jpg)
mind you we're not even inspecting the RESTfulness
![Page 72: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/72.jpg)
we're just looking at Twitter's API from an HTTP perspective
![Page 73: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/73.jpg)
CURRENT STATE
• GET http://api.twitter.com/1/statuses/show/12345.json
• POST http://api.twitter.com/1/statuses/update.json
•DELETE http://api.twitter.com/1/statuses/destroy/12345.json
• GET http://api.twitter.com/1/statuses/retweets/12345.json
• PUT http://api.twitter.com/1/statuses/retweet/12345.json
Doesn’t allow Accept header
Why a PUT?
Why the difference?
Posts toauth’duser!“DELETE destroy”, RPC much?
![Page 74: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/74.jpg)
COULD BE SO MUCH SIMPLER
• http://twitter.com/username/statuses/
• POST to create a new tweet
• http://twitter.com/username/statuses/12345
•DELETE deletes (PUT could be used for updates)
• http://twitter.com/username/statuses/12345/retweets/
• POST creates a new retweet
![Page 75: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/75.jpg)
INTERMISSIONWhat's the Biggest Reason for the Success of the Web?
![Page 76: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/76.jpg)
WWW
![Page 77: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/77.jpg)
first data exchange system
![Page 78: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/78.jpg)
planetary scale
![Page 79: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/79.jpg)
![Page 80: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/80.jpg)
![Page 81: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/81.jpg)
why is that possible?
![Page 82: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/82.jpg)
Hyperlinks!
![Page 83: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/83.jpg)
no tight coupling!
![Page 84: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/84.jpg)
loosely coupled by design
![Page 85: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/85.jpg)
no notification infrastructure
![Page 86: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/86.jpg)
HTTP/1.1 404 Not Found
![Page 87: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/87.jpg)
embraces failure
![Page 88: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/88.jpg)
more information != more friction
![Page 89: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/89.jpg)
no limits to scalability
![Page 90: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/90.jpg)
WWW is protocol-centric
![Page 91: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/91.jpg)
VOLUME TWORESTful Services with Hypermedia
![Page 92: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/92.jpg)
THE UNIFORM INTERFACE
• Identification of Resources (e.g. through URIs)
• Representations are conceptually separate!
•Manipulation Through Representations (i.e. they are complete)
• Self-Descriptive Messages (containing all information)
• Hypermedia As The Engine Of Application State ("HATEOAS")
magic awesomesauce essential to REST
![Page 93: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/93.jpg)
HATEOASThe Missing Piece in the Puzzle
![Page 94: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/94.jpg)
ONE LAST PIECE IS MISSING
• How does a client know what to do with representations?
• How do you go to the “next” operation?
•What are the URLs for creating subordinate resources?
•Where is the contract for the service?
![Page 95: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/95.jpg)
HYPERMEDIA AS THE ENGINE OF APPLICATION STATE
• Use links to allow clients to discover locations and operations
• Link relations are used to express the possible options
• Clients do not need to know URLs, so they can change
• The entire application workflow is abstracted, thus changeable
• The hypermedia type itself could be versioned if necessary
•No breaking of clients if the implementation is updated!
![Page 96: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/96.jpg)
(X)HTML and Atom are Hypermedia formats
![Page 97: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/97.jpg)
Or you roll your own...
![Page 98: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/98.jpg)
GET /products/1234 HTTP/1.1Host: acme.comAccept: application/vnd.com.acme.shop+xml
HTTP/1.1 200 OKContent-‐Type: application/vnd.come.acme.shop+xml; charset=utf-‐8Allow: GET, PUT, DELETE
<?xml version="1.0" encoding="utf-‐8"?><product xmlns="urn:com.acme.prods" xmlns:atom="http://www.w3.org/2005/Atom"> <id>1234</id> <name>Red Stapler</name> <price currency="EUR">3.14</price> <atom:link rel="payment" type="application/vnd.com.acme.shop+xml" href="http://acme.com/products/1234/payment"/></product>
re-use Atom forlink relations
meaning defined in IANA Link Relations list
A CUSTOM MEDIA TYPE
Remind clients ofUniform Interface :)
![Page 99: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/99.jpg)
boom, RMM Level 3
![Page 100: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/100.jpg)
XML is really good for hypermedia formats
![Page 101: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/101.jpg)
(hyperlinks, namespaced attributes, re-use of formats, …)
![Page 102: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/102.jpg)
JSON is more difficult
![Page 103: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/103.jpg)
(no hyperlinks, no namespaces, no element attributes)
![Page 104: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/104.jpg)
<?xml version="1.0" encoding="utf-‐8"?><product xmlns="urn:com.acme.prods" xmlns:atom="http://www.w3.org/2005/xlink"> <id>1234</id> <name>Red Stapler</name> <price currency="EUR">3.14</price> <atom:link rel="payment" type="application/com.acme.shop+xml" href="http://acme.com/products/1234/payment"/></product>
{ id: 1234, name: "Red Stapler", price: { amount: 3.14, currency: "EUR" }, links: [ { rel: "payment", type: "application/vnd.com.acme.shop+json", href: "http://acme.com/products/1234/payment" } ]}
XML VERSUS JSON
![Page 105: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/105.jpg)
also, JSON is hard to evolve without breaking clients
![Page 106: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/106.jpg)
<?xml version="1.0" encoding="utf-‐8"?><products xmlns="http://acme.com/shop/products"> <product id="123"> <name>Bacon</name> <price>5.99</price> </product></products>
![Page 107: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/107.jpg)
<?xml version="1.0" encoding="utf-‐8"?><products xmlns="http://acme.com/shop/products"> <product id="123"> <name>Bacon</name> <price>5.99</price> OMNOMNOM Bacon </product></products>
![Page 108: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/108.jpg)
<?xml version="1.0" encoding="utf-‐8"?><products xmlns="http://acme.com/shop/products"> <product id="123"> <name>Bacon</name> <price>5.99</price> <price currency="EUR">4.49</price> </product></products>
![Page 109: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/109.jpg)
<?xml version="1.0" encoding="utf-‐8"?><products xmlns="http://acme.com/shop/products"> <product id="123"> <name xml:lang="en">Bacon</name> <name xml:lang="de">Speck</name> <price>5.99</price> </product></products>
![Page 110: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/110.jpg)
<?xml version="1.0" encoding="utf-‐8"?><products xmlns="http://acme.com/shop/products"> <product id="123"> <name xml:lang="en">Bacon</name> <name xml:lang="de">Speck</name> <price>5.99</price> <link rel="category" href="..." /> </product></products>
![Page 111: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/111.jpg)
and hey
![Page 112: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/112.jpg)
without hypermedia, your HTTP interface is not RESTful
![Page 113: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/113.jpg)
that’s totally fineand sometimes even the only way to do it
![Page 114: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/114.jpg)
(e.g. CouchDB or S3 are never going to be RESTful)
![Page 115: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/115.jpg)
just avoid calling it a "REST API" :)
![Page 116: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/116.jpg)
good hypermedia format example: the Lovefilm API
![Page 117: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/117.jpg)
<?xml version="1.0" encoding="utf-‐8" standalone="yes"?><search> <total_results>6</total_results> <items_per_page>1</items_per_page> <start_index>1</start_index> <link href="http://openapi.lovefilm.com/catalog/games?start_index=1&items_per_page=1&term=old" rel="self" title="self"/> <link href="http://openapi.lovefilm.com/catalog/games?start_index=2&items_per_page=1&term=old" rel="next" title="next"/> <link href="http://openapi.lovefilm.com/catalog/games?start_index=6&items_per_page=1&term=old" rel="last" title="last"/> <catalog_title> <can_rent>true</can_rent> <release_date>2003-‐09-‐12</release_date> <title full="Star Wars: Knights of the Old Republic" clean="Star Wars: Knights of the Old Republic"/> <id>http://openapi.lovefilm.com/catalog/title/59643</id> <adult>false</adult> <number_of_ratings>574</number_of_ratings> <rating>4</rating> <category scheme="http://openapi.lovefilm.com/categories/catalog" term="games"/> <category scheme="http://openapi.lovefilm.com/categories/format" term="Xbox"/> <category scheme="http://openapi.lovefilm.com/categories/genres" term="Adventure"/> <category scheme="http://openapi.lovefilm.com/categories/genres" term="Role-‐playing"/> <category scheme="http://openapi.lovefilm.com/categories/certificates/bbfc" term="TBC"/> <link href="http://openapi.lovefilm.com/catalog/title/59643/synopsis" rel="http://schemas.lovefilm.com/synopsis" title="synopsis"/> <link href="http://openapi.lovefilm.com/catalog/title/59643/reviews" rel="http://schemas.lovefilm.com/reviews" title="reviews"/> <link href="http://www.lovefilm.com/product/59643-‐Star-‐Wars-‐Knights-‐of-‐the-‐Old-‐Republic.html?cid=LFAPI" rel="alternate" title="web page"/> </catalog_title></search>
![Page 118: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/118.jpg)
ROOM FOR IMPROVEMENT IN THE LOVEFILM API
• Uses application/xml instead of a custom media type
•Once that is fixed, all the link elements could also have a “type” attribute indicating the media type
• Should use XML namespaces on the root element, with one namespace per type (e.g. “urn:com.lovefilm.api.item”, “urn:com.lovefilm.api.searchresult” and so on)
• That way, clients can determine the resource type easily
![Page 119: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/119.jpg)
another great RESTful API: Huddle
![Page 120: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/120.jpg)
<document xmlns="http://schema.huddle.net/2011/02/" title="TPS report May 2010" description="relentlessly mundane and enervating."> <link rel="self" href="..." /> <link rel="parent" href="..." title="..."/> <link rel="edit" href="..." /> <link rel="delete" href="..." /> <link rel="content" href="..." title="..." type="..." /> <link rel="thumb" href="..." /> <link rel="version-‐history" href="..." /> <link rel="create-‐version" href="..." /> <link rel="comments" href="..." /> <actor name="Peter Gibson" rel="owner"> <link rel="self" href="..." /> <link rel="avatar" href="..." type="image/jpg" /> <link rel="alternate" href="..." type="text/html" /> </actor> <actor name="Barry Potter" rel="updated-‐by"> <link rel="self" href="..." /> <link rel="avatar" href="..." type="image/jpg" /> <link rel="alternate" href="..." type="text/html" /> </actor> <size>19475</size> <version>98</version> <created>2007-‐10-‐10T09:02:17Z</created> <updated>2011-‐10-‐10T09:02:17Z</updated> <processingStatus>Complete</processingStatus> <views>9</views></document>
![Page 121: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/121.jpg)
ROOM FOR IMPROVEMENT IN THE HUDDLE API
• Uses custom rels like “thumb” or “avatar” not defined in the IANA registry (http://www.iana.org/assignments/link-relations)
• Risk of collisions and ambiguity; should use something like “http://rels.huddle.net/thumb” instead.
• Uses one global XML schema and namespace for all entities
• Clients cannot detect entity type based on namespace
•Difficult to evolve schema versions independently
![Page 122: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/122.jpg)
API VERSIONINGMedia Types To The Rescue!
![Page 123: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/123.jpg)
why not api.myservice.com/v1/foo/bar?and then api.myservice.com/v2/foo/bar?
![Page 124: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/124.jpg)
different URLs means different resources!
![Page 125: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/125.jpg)
also, keep bookmarks (by machines) in mind
![Page 126: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/126.jpg)
GET /products HTTP/1.1Host: acme.comAccept: application/vnd.com.myservice+xml
HTTP/1.1 200 OKContent-‐Type: application/vnd.com.myservice+xml; charset=utf-‐8Allow: GET, POST
<?xml version="1.0" encoding="utf-‐8"?><products xmlns="urn:com.acme.products" xmlns:xl="http://www.w3.org/1999/xlink"> <product id="1234" xl:type="simple" xl:href="http://acme.com/products/1234"> <name>Red Stapler</name> <price currency="EUR">3.14</price> </product></products>
API VERSION 1
![Page 127: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/127.jpg)
(some years pass...)
![Page 128: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/128.jpg)
GET /products HTTP/1.1Host: acme.comAccept: application/vnd.com.myservice.v2+xml
HTTP/1.1 200 OKContent-‐Type: application/vnd.com.myservice.v2+xml; charset=utf-‐8Allow: GET, POST
<?xml version="1.0" encoding="utf-‐8"?><products xmlns="urn:com.acme.products" xmlns:xl="http://www.w3.org/1999/xlink"> <product id="1234" xl:type="simple" xl:href="http://acme.com/products/1234"> <name>Red Stapler</name> <price currency="EUR">3.14</price> <availability>false</availability> </product></products>
API VERSION 2
![Page 129: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/129.jpg)
clients can’t upgrade protocol for known URLs!
![Page 130: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/130.jpg)
Also, imagine every install of phpBB or Drupal had an API
![Page 131: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/131.jpg)
If the version is in the URL, clients need to regex those
![Page 132: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/132.jpg)
http://sharksforum.org/community/api/v1/threads/102152
![Page 133: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/133.jpg)
http://forum.sharksforum.org/api/v1/threads/102152
![Page 134: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/134.jpg)
that would be fail
![Page 135: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/135.jpg)
or what if another forum software wants the same API?
![Page 136: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/136.jpg)
also would have to use “/v1/” in their URLs
![Page 137: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/137.jpg)
URI based versioning kills interoperability
![Page 138: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/138.jpg)
YOU MIGHT BE WONDERINGWhy Exactly Is This Awesome?
![Page 139: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/139.jpg)
THE MERITS OF REST
• Easy to evolve: add new features or elements without breaking BC
• Easy to learn: developers can "browse" service via link rels
• Easy to scale up: grows well with number of features, users and servers
• Easy to implement: build it on top of HTTP, and profit!
• Authentication & TLS
• Caching & Load Balancing
• Conditional Requests
• Content Negotiation
![Page 140: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/140.jpg)
but...
![Page 141: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/141.jpg)
hold on, you say
![Page 142: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/142.jpg)
a plain HTTP-loving service does the job, you say
![Page 143: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/143.jpg)
surely, there is a merit to REST beyond extensibility, you ask
![Page 144: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/144.jpg)
nope
![Page 145: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/145.jpg)
"REST is software design on the scale of decades: every detail is intended to promote software longevity and independent evolution. Many of the constraints are directly opposed to short-term efficiency. Unfortunately, people are fairly good at short-term design, and usually awful at long-term design."
Roy Fielding
![Page 146: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/146.jpg)
"Most of REST's constraints are focused on preserving independent evolvability over time, which is only measurable on the scale of years. Most developers simply don't care what happens to their product years after it is deployed, or at least they expect to be around to rewrite it when such change occurs."
Roy Fielding
![Page 147: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/147.jpg)
FURTHER READING
• Ryan TomaykoHow I Explained REST to my Wifehttp://tomayko.com/writings/rest-to-my-wife
• Jim Webber, Savas Parastatidis & Ian RobinsonHow to GET a Cup of Coffeehttp://www.infoq.com/articles/webber-rest-workflow
• Roy Thomas FieldingArchitectural Styles and the Design of Network-based Software Architectureshttp://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm
![Page 148: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/148.jpg)
BOOKS ON REST
• Jim Webber, Savas Parastatidis, Ian RobinsonREST in PracticeISBN: 978-0596805821
• Subbu AllamarajuRESTful Web Services CookbookISBN: 978-0596801687
• Leonard Richardson, Sam RubyRESTful Web ServicesISBN: 978-0596529260
![Page 149: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/149.jpg)
!e End
![Page 150: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/150.jpg)
Questions?
![Page 151: DESIGNING HTTP INTERFACES AND RESTFUL WEB SERVICES · THE RISE OF WEB SERVICES Ohai, I'm ur CEO, I canhaz SOAP API plz, today, kthx?](https://reader031.vdocuments.us/reader031/viewer/2022011917/5fed53ea168e6d3a2e772cb7/html5/thumbnails/151.jpg)
THANK YOU!This was http://munich2012.drupal.org/node/2673
by @dzuelkeSend me questions or hire us:[email protected]