-
Define CRUD.
CRUD defines the four features an app that interacts with a database should have: create, read, update, delete. -
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.
- get '/tasks' - displays (reads) all existing tasks in database
- get '/tasks/new' - provides form for inputting new task (create)
- post '/tasks' - submits data for new task (create)
- get '/tasks/:id' - displays (reads) data from one task
- get '/tasks/:id/edit' - provides form for editing existing task (update)
- put '/tasks/:id' - submits data for revising existing task (update)