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

Designing mobile friendly APIs

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers.
Avatar for Milan Cermak Milan Cermak
February 13, 2014

Designing mobile friendly APIs

Slides from the talk I gave at 1st HTTP API group meetup in Berlin.

Avatar for Milan Cermak

Milan Cermak

February 13, 2014
Tweet

More Decks by Milan Cermak

Other Decks in Technology

Transcript

  1. • Bytes matter • Power consumption: • 3G > wifi

    > 2G • On cellular, only 2 concurrent networking requests
  2. Minimal vs. full approach ! • Send only the minimal

    possible representation, let the users specify what they want via fields! • Send the full available representation of the resource
  3. Batched requests • i.e. Facebook Graph API • A solution

    until widespread adoption of HTTP2 • Not really RESTful, but really useful
  4. Batched requests • Server-side implementation can be tricky: • Error

    handling • HTTP headers • Parallel execution vs. POST/PUT/DELETE