Class 13: More CRUD
Resources
Reading Statement
Why this topic matters as it relates to the material I am studying: We will be using CRUD API a lot, not only this week, but in our final 301 week as well.
CRUD Basics
-
Which HTTP method would you use to update a record through an API? The PUT method
-
Which REST methods require an ID parameter? PUT and DELETE
Speed Coding: Building a CRUD API Video
-
What’s the relationship between REST and CRUD? CRUD allows us to manipulate information that describes functions while REST allows us control over data through HTTP commands.
-
If you had to describe the process of creating a RESTful API in 5 steps, what would they be?
- Step 1: create a router.
- Step 2: Enable all the paths needed in the router.
- Step 3: Mount the routes so that they can be accessed and set up try/catch on each path created with your routes.
- Step four, insert the values into the database.
- Step five, create the front end to allow the interface of the API.
Things I Would Like to Know More About
- Although it was pretty neat watching somone speed run building a CRUD API, it left me feeling confused and wondering if I will reach that level of skill at any point in the near future. Probably not.