source: http://www.flickr.com/photos/variationblogr/6658533167/, Used under CC.
Slide 19
Slide 19 text
source: http://www.flickr.com/photos/variationblogr/6658533167/, Used under CC.
Slide 20
Slide 20 text
Simple to learn,
explore.
Slide 21
Slide 21 text
No content
Slide 22
Slide 22 text
Use your browser
Slide 23
Slide 23 text
No content
Slide 24
Slide 24 text
Versioning
Slide 25
Slide 25 text
A Public API
vs
Mobile Applications
vs
Your Web Apps
(e.g. Backbone)
Slide 26
Slide 26 text
Header versioning
vs
URI versioning
Slide 27
Slide 27 text
Building APIs
Slide 28
Slide 28 text
Grape
https://github.com/intridea/grape
Slide 29
Slide 29 text
Grape is a REST-like API micro-
framework for Ruby. It is built to
complement existing web application
frameworks such as Rails and Sinatra
by providing a simple DSL to easily
provide APIs.
Slide 30
Slide 30 text
Grape is a REST-like API micro-
framework for Ruby. It is built to
complement existing web application
frameworks such as Rails and Sinatra
by providing a simple DSL to easily
provide APIs.
Slide 31
Slide 31 text
It has built-in support for common
conventions such as multiple formats,
subdomain/prefix restriction, and
versioning.
Slide 32
Slide 32 text
It has built-in support for common
conventions such as multiple formats,
subdomain/prefix restriction, and
versioning.
“Rails::API is a subset of a normal
Rails application, created for
applications that don't require all
functionality that a complete Rails
application provides.”
Slide 38
Slide 38 text
“Rails::API is a subset of a normal
Rails application, created for
applications that don't require all
functionality that a complete Rails
application provides.”
Slide 39
Slide 39 text
Take Rails,
Skip what you
don’t need.
Slide 40
Slide 40 text
Familiar setup,
Similar controllers,
No view layer.
Slide 41
Slide 41 text
No cookies,
No flash,
No sessions,
No front end stuff.
Built on Rails like Rails-API,
Both released around
the same time.
Slide 45
Slide 45 text
RocketPants::Base
Slide 46
Slide 46 text
URI-based
versioning
Slide 47
Slide 47 text
Automatic Header
Metadata
(X-Api-*)
Slide 48
Slide 48 text
HTTP Link
Headers
Slide 49
Slide 49 text
Opinionated
responses
Slide 50
Slide 50 text
Smart error
handling /
mapping
Slide 51
Slide 51 text
TL;DR: Consider
Grape, Rails::API
or Rocket Pants.
Slide 52
Slide 52 text
More Reading:
“Designing Hypermedia APIs” by Steve Klabnik
The Echonest Developer Documentation
For building APIs, API Smith
Want to read my versioning argument?
See http://discovr.info/2012/05/on-apis-and-
versioning/