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

Building API For The REST of Us

Terry
September 26, 2016

Building API For The REST of Us

Slides in RubyConf China 2016 Chengdu

Terry

September 26, 2016
Tweet

More Decks by Terry

Other Decks in Programming

Transcript

  1. Conditions • Based on Ruby on Rails • Not a

    pure API service, web is still the first-class citizen • Client builder is resource owner or ourselves
  2. VS

  3. Michael Bleigh Grape is created by my coworker in Intridea.

    He is also the creator of oauth2, omniauth, hashie, multi_json …
  4. Token Based Auth • Simple • A little bit more

    secure than Basic Auth • Muti-tokens for authorisation
  5. Strategy • Put business related data in payload as JSON

    • Put authentication related data out of payload
  6. –DHH “Every time you use a loop in your view,

    but you don’t use partial, you might be wrong.”
  7. Maybe, there is no BEST way We need know why

    people think different We need know compromise