Your SlideShare is downloading. ×
Road to REST
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.


Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Road to REST


Published on

Video and slides synchronized, mp3 and slide download available at …

Video and slides synchronized, mp3 and slide download available at

Rickard Oberg explains how to expose use-cases to solve the linking problem in RESTful APIs, and how this will simplify both API development, documentation, as well as client development. Filmed at

Rickard Oberg has worked on several OpenSource projects that involve J2EE development, such as JBoss, XDoclet and WebWork. He has also been Principal Architect of the SiteVision CMS/portal platform, where he used AOP as the foundation. Now he works for Neo Technology, building the leading graph database Neo4j. Twitter: @rickardoberg

Published in: Technology

  • Be the first to comment

  • Be the first to like this

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

No notes for slide


  • 1. One link at a timeRickard Öberg, Neo TechnologyQCon code: 7817The Road to REST
  • 2. News & Community Site• 750,000 unique visitors/month• Published in 4 languages (English, Chinese, Japanese and BrazilianPortuguese)• Post content from our QCon conferences• News 15-20 / week• Articles 3-4 / week• Presentations (videos) 12-15 / week• Interviews 2-3 / week• Books 1 / monthWatch the video with slidesynchronization on!
  • 3. Presented at QCon Londonwww.qconlondon.comPurpose of QCon- to empower software development by facilitating the spread ofknowledge and innovationStrategy- practitioner-driven conference designed for YOU: influencers ofchange and innovation in your teams- speakers and topics driving the evolution and innovation- connecting and catalyzing the influencers and innovatorsHighlights- attended by more than 12,000 delegates since 2007- held in 9 cities worldwide
  • 4. How it all began
  • 5. The Mission
  • 6. A fork in the roadRMI?SOAP?REST?
  • 7. Exploring
  • 8. Richardson Maturity modelLevel 0SOAP, XML RPC, POX – Single URILevel 1URI Tunnelling – Many URIs, Single verbLevel 2Many URIs, many verbsCRUD services (e.g. Amazon S3)Level 3Level 2 + Hypermedia – RESTful Services
  • 9. REST to the rescue!“Representational State Transfer (REST)is a style of software architecture fordistributed hypermedia systems such asthe World Wide Web”
  • 10. GuidelinesClient–serverStatelessCacheableLayered systemUniform interface
  • 11. More guidelinesIdentification of resourcesManipulation of resources throughthese representationsSelf-descriptive messagesHypermedia As The Engine OfApplication State (HATEOAS)
  • 12. The narrow road
  • 13. What shall we expose?ClientServerData
  • 14. What shall we expose?ClientServerDomain model
  • 15. How?Servlets?JAX-RS?
  • 16. What the...?/users/rickard/changepassword/users/rickard/resetpassword
  • 17. Where is HATEOAS?!?“The next control state of an application residesin the representation of the first requestedresource, … The application state is controlled andstored by the user agent … anticipate changes tothat state (e.g., link maps and prefetching ofrepresentations) … The model application istherefore an engine that moves from one state tothe next by examining and choosing fromamong the alternative state transitions in thecurrent set of representations.” - Roy Fielding
  • 18. What now?!?
  • 19. One step at a time
  • 20. What shall we expose?ClientServerUse cases
  • 21. From the user perspective/account/changepassword/administration/server/users/rickard/resetpassword
  • 22. Who can do what?/workspace/cases/<123>//administrator/.../overview/...
  • 23. Follow the named linkREST APILinks LinkQuery Command
  • 24. Application flowGET ..../indexGET <link with rel="possiblelabels">addlabel?id=1234, rel=addlabel,"Urgent!"POST the link
  • 25. Link checkingWhat can the user do? Check for links!
  • 26. Wohoo!
  • 27. VersioningHATEOAS helpsExposing use cases helpsSend headerEx. X-STREAMFLOW-API: 1.2Client libraries
  • 28. PerformanceExposing use cases really helpsUse e.g. GQL for table queriesClient decides columns and filteringfrom fixed set
  • 29. TL;DLA Good REST API is like an uglywebsiteRESTful clients should follow linksand submit forms
  • 30. Q &