Hypermedia APIs
Why, what, how?
Vesa Vänskä, Kisko Labs
Helsinki Ruby Brigade, Rails Girls
Warning!
What if all changes of
the backend wouldn't
require an update to
the frontend?
Current state is like
brittle Selenium tests
HyperText is a way to link
and access information of
various kinds as a web of
nodes in which the user
can browse at will....
URLs in the
response aka
HATEOAS
https://developer.paypal.com/docs/api/#hateoas-links
http://37signals.com/svn/posts/3373-getting-hyperabout-hypermedia-apis
REST?
Increased flexibility
Example: Feature
needs to be
disabled
Example: Form
fields need to be
changed
How would you
build a
Hypermedia API?
State machine
Following a link
changes the state
http://whyidentity.blogspot.fi/2013/04/hypermedialinks-in-paypal-restful-apis.html
http://www.jayway.com/2012/10/06/why-hypermediaapis/
Tooling
•
•
•

Response generators
Clients
Documentation tools
Swagger
http://developers.helloreverb.com/swagger/
Adoption
Books

Designing Hypermedia APIs by Steve Klabnik
Other resources
A Hypermedia API Reading List
http://blog.steveklabnik.com/posts/
2012-02-27-hypermedia-api-reading-list
Future ambitions
Media-type
standardization
JSON Schema, HAL, Collection+JSON etc.
Unified
documentation
Thank you!
twitter.com/vesan
vesavanska.com
Upcoming SlideShare
Loading in …5
×

Hypermedia APIs – Why, what, how?

1,442 views

Published on

High-level view of Hypermedia APIs from a pragmatic viewpoint. Presented at Helsinki Ruby Brigade January 2014 meet-up.

Published in: Technology, Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,442
On SlideShare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
7
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Hypermedia APIs – Why, what, how?

  1. 1. Hypermedia APIs Why, what, how? Vesa Vänskä, Kisko Labs Helsinki Ruby Brigade, Rails Girls
  2. 2. Warning!
  3. 3. What if all changes of the backend wouldn't require an update to the frontend?
  4. 4. Current state is like brittle Selenium tests
  5. 5. HyperText is a way to link and access information of various kinds as a web of nodes in which the user can browse at will. — Tim Berners-Lee, 1992
  6. 6. URLs in the response aka HATEOAS
  7. 7. https://developer.paypal.com/docs/api/#hateoas-links
  8. 8. http://37signals.com/svn/posts/3373-getting-hyperabout-hypermedia-apis
  9. 9. REST?
  10. 10. Increased flexibility
  11. 11. Example: Feature needs to be disabled
  12. 12. Example: Form fields need to be changed
  13. 13. How would you build a Hypermedia API?
  14. 14. State machine
  15. 15. Following a link changes the state
  16. 16. http://whyidentity.blogspot.fi/2013/04/hypermedialinks-in-paypal-restful-apis.html
  17. 17. http://www.jayway.com/2012/10/06/why-hypermediaapis/
  18. 18. Tooling • • • Response generators Clients Documentation tools
  19. 19. Swagger http://developers.helloreverb.com/swagger/
  20. 20. Adoption
  21. 21. Books Designing Hypermedia APIs by Steve Klabnik
  22. 22. Other resources A Hypermedia API Reading List http://blog.steveklabnik.com/posts/ 2012-02-27-hypermedia-api-reading-list
  23. 23. Future ambitions
  24. 24. Media-type standardization JSON Schema, HAL, Collection+JSON etc.
  25. 25. Unified documentation
  26. 26. Thank you! twitter.com/vesan vesavanska.com

×