A keynote from APIdays, Dec 3-4 2012, Paris, France that covers an analytical & practical approach towards designing APIs in general, and hypermedia in specific, as outlined by an experience at Klarna, Sweden.
Questions? http://twitter.com/andreineculau
Higher quality slides at: https://speakerdeck.com/andreineculau/rpc-to-rest-hypermedia
21. consume: RESTit
1 URI as the only runtime requirement
Centered around resources
Simplify representations
Transfer Protocol Layer
Hypermedia Layer
Hooks
Sugar
22. consume: RESTit
1 it ’ should enter the store and look around ’ , ( done ) -
2 re$ = RESTit (). re$
3 re$ ( ’ http :// starbucks . apiary . io ’)
4 . read ()
5 . callback ( err , resp ) -
6 return done err if err
7 resp [0]. statusCode . should . equal 200
8 done ()
1 it ’ should see what can be done with orders ’ , ( done ) -
2 re$ = RESTit (). re$
3
4 re$ ( ’ http :// starbucks . apiary . io ’)
5 . read ()
6 . follow ( ’/ rels / orders ’)
7 . options ()
8 . callback ( err , resp ) -
9 return done err if err
10 resp [0]. statusCode . should . equal 200
11 resp [0]. canPOST . should . equal true
12 should . not . equal resp [0]. canDELETE , true # undefined
13 done ()
27. RPC to Hypermedia
REST
Concrete case on Payments API
@andreineculau
December 3-4, 2012, APIdays.io
28. Credits
Scott Brinker, Marketing Technology Landscape Supergraphic
Adam DuVander/Programmable Web, 5000 APIs: Facebook, Google, Twitter are changing the
web
Google Trends: Architecture styles
Simon Dongle, Good Morning 2012
Alan Dean, HTTP/1.1 activity diagram
Philipp Meier, Liberator
Data-Driven Documents
sigma.js