Skip to content

Instantly share code, notes, and snippets.

View stevepentler's full-sized avatar

Steve Pentler stevepentler

View GitHub Profile
  1. Describe the request *response cycle. Start with the client making a request.
  • oh geez! Client sends request, makes it through rack and middleware, heads to DNS? DNS bounces the message to a few more servers with greater specificity each time. Eventually it locates the server and passes the response back through the rake/middleware to the client.
  1. Explain when each of these HTTP verbs would be used: GET, POST, PUT, DELETE.
  • GET is used to retrieve and display information from the server.
  • POST is used to modify the server by adding information.
  • PUT modifies information that exists in the server with greater specificity than POST.
  • DELETE LOLZ, duh
  1. What are all of the necessary routes for full CRUD functionality in Sinatra app? Why do we need seven routes when there are only four CRUD actions?
@stevepentler
stevepentler / cfu_crud_in_sinatra.markdown
Created December 1, 2015 20:03 — forked from rwarbelow/cfu_crud_in_sinatra.markdown
CRUD in Sinatra -- Check for Understanding
  1. Define CRUD.
  2. There are seven verb + path combinations that are necessary in a basic Sinatra app in order to provide full CRUD functionality. List each of the seven combinations, and explain what each is for.
  3. Why do we use set method_override: true?
  4. Explain the difference between value and name in this line: <input type='text' name='task[title]' value="<%= @task.title %>"/>.
  5. What are params? Where do they come from?