Upgrade to Pro — share decks privately, control downloads, hide ads and more …

REST API Design - My Practices

REST API Design - My Practices

Android Developer Days 2015
View Video (Starts from 19.00) >> http://www.butterflytv.net/player.html?videoId=from_pi44461431134246344

Burak Aydın

May 11, 2015
Tweet

More Decks by Burak Aydın

Other Decks in Programming

Transcript

  1. REST • Client-server • Stateless state of the resource •

    Cacheable • Layered system load balancing, cache, etc. • Uniform interface guiding principles 4
  2. REST Guiding Principles •Identification of resources URIs •Manipulation of resources

    through these representations representation and it's metadata = enough information to manipulate it •Self-descriptive messages each message = enough information to process it (MIME, cache, ...) •Hypermedia as the engine of application state 5
  3. Glory of REST (Leonard Richardson's Maturity Model) 1. “The Swamp

    of POX” You’re using HTTP to make RPC calls. HTTP is only really used as a tunnel. 2. Resources Rather than making every call to a service endpoint, you have multiple endpoints that are used to represent resources, and you’re talking to them. 3. HTTP verbs You interact with resources using HTTP verbs, rather than always using POST. 4. HATEOAS Hypermedia Controls. HATEOAS. You’re 100% REST compliant. 6
  4. HATEOS Hypertext As The Engine Of Application State ▪ Used

    to find your way through the API ▪ Actually telling us what is allowed and what not 7