reading-notes

301 class 13 notes

Why this matters: This information matters because it defines the functions and methods used in CRUD, and gives us a very fast demo of creating a CRUD API via Twitch.


CRUD Basics

Source: https://medium.com/geekculture/crud-operations-explained-2a44096e9c88

1. Which HTTP method would you use to update a record through an API?

PUT, it replaces all current data of the target resource with the uploaded content.

2. Which REST methods require an ID parameter?

PUT and DELETE


Speed Coding: Building a CRUD API

Source: https://www.youtube.com/watch?v=EzNcBhSv1Wo

1. What’s the relationship between REST and CRUD?

REST is an architectural system centered around resources and Hypermedia using HTTP commands. CRUD is a cycle meant to maintain records in a database setting. CRUD is a way of manipulating information, describing the function of an application. Source

2. If you had to describe the process of creating a RESTful API in 5 steps, what would they be?

  1. Identify resources - Object Modeling

  2. Create Model URIs (resource URIs = API endpoints)

  3. Determine resource representations (defined in either XML or JSON)

  4. Assigning HTTP methods (map app operations to resource URIs)

  5. More Actions: logging, security, discovery, etc.

Source


Things I Want To Know More About: