Skip to content

Instantly share code, notes, and snippets.

@noahpatterson
Created May 15, 2014 15:55
Show Gist options
  • Save noahpatterson/53e832bcf9b60263ea98 to your computer and use it in GitHub Desktop.
Save noahpatterson/53e832bcf9b60263ea98 to your computer and use it in GitHub Desktop.
RailsConf2014Notes

Notes From Rails Conf 2014

#What is REST? http://www.confreaks.com/videos/3354-railsconf-what-is-rest-why-is-it-part-of-the-rails-way

Representation State Transfer

###Is made of 3 parts

  1. Resource: Anything that can be named. Has a resource identifier: URI -> ID for that resource
  2. Representations: e.g. HTML, JSON
  3. Metadata: how you want the information

###In rails

  1. routes: resources, members, collections
  2. controller: respond_to, format, status, headers
  3. views: show.html.erb vs show.json.jbuilder

###Hypermedia - Navigable APIs API should have links to navigate to related parts of the API e.g.

  • provide links to next page of a returned collection
  • A result to a team resource, you can then provide links to other team things

####Gems for hypermedia

  • rails-api
  • grape
  • roar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment