RESTLET’S GET THE FACTS STRAIGHT
Juozas Kaziukėnas // juokaz.com // @juokaz
Juozas Kaziukėnas, Lithuanian
You can call me Joe
More info http://juokaz.com
Why is it that any college educated person in the world can fill out a form to apply for a job.
But making the exact same HTTP request to an API qualifies you as a developer?
Leonard Richardson
HATEOAS
HYPERMEDIA CONSTRAINT
HYPERMEDIA CONSTRAINTGET /machines/1Host: example.comAccept: application/xml
HTTP/1.1 200 OKContent-Type: application/xml<machine><status>stopped</status><link rel="start" method="post" href="/machines/1?op=start" /></machine>
HTTP/1.1 200 OKContent-Type: application/xml<machine><status>running</status><link rel="stop" method="post" href="/machines/1?op=stop" /></machine>
IT’S HOW THE WEB WORKS
MATURITY MODEL
HTTP IS BASED ON AGREEING
WHAT DOES “REST” MEAN?
GET /POSTS
IT MEANS A GOOD THING
MULTIPLE THINGS
WRONGBut...
NOT ABOUT BEING RESTFUL
REST IS NOT
• not about being called RESTful
• not about the URLs
• not about HTTP verbs
• not about JSON vs XML
• not a protocol
DESIGNING INTERFACES
DOMAIN DUMP != API
EASY INTERFACES
•Discoverable
• Stateless
• Cacheable
• Integratable
• Leveraging HTTP
WHY WOULD YOU GO THE EXTRA MILE?
THANKS!Juozas Kaziukėnas
@juokaz