reading-notes

Reading notes for Code Fellows!


Project maintained by William-Moreno Hosted on GitHub Pages — Theme by mattgraham

Express


What is the Difference Between PUT and PATCH?

According to MDN Web Docs, PUT and PATCH are both HTTP request methods. Request methods are often called HTTP verbs. They indicate a desired action to be performed for a given resource.

3 Services/Tools to Mock an API for Development

According to Kristopher Sandoval’s article “10+ Tools To Mock HTTP Requests” on Nordic APIs website, mocking HTTP requests is a vital part of testing. These tools should be able to mock common API interactions and HTTP request flows. Various tools offer differing options and implementations.

3 Samples Provided in the Article

Compare and Contrast Swagger and APIDoc.js

Swagger APIDoc.js
creates documentation for API creates documentation for API
requires that implemented methods be documented with custom comment data requires that implemented methods be documented with custom comment data
uses OpenAPI specification to work creates documentation from API annotations in source code
Swagger Documentation APIDoc.js

Which HTTP Status Codes Should Be Sent with Each Type of (Un)Successful API Call?

According to MDN Web Docs, HTTP response status codes are grouped into 5 classes:

  1. Informational responses (100 - 199)
  2. Successful responses (200 - 299)
  3. Redirects (300 - 399)
  4. Client errors (400 - 499)
  5. Server errors (500 - 599)

Compare and Contrast SOAP and ReST

The following information is derived from the 2017 Stackify article “SOAP vs. REST: The Differences and Benefits Between the Two Widely-Used Web Service Communication Protocols” by Alexandra Altvater.

SOAP was the standard approach to web service communication protocols for a long time but it has been dominated by REST in recent years. REST now represents over 70% of public APIs.

SOAP ReST
Simple Object Access Protocol Representational State Transfer
performs operations through messaging patterns simply accesses data
provides more robust security and support for identity verification allows greater variety of data formats
offers built in logic to compensate for failed communications generally considered easier to work with
Tends to be slower because it uses the complex XML format generally faster and uses less bandwidth and easier to integrate with existing websites

Vocabulary Terms

| Vocabulary Term | Definition | | — | — | | Web Server | A web server is a piece of software that often runs on a hardware server offering service to a user, usually referred to as the client MDN Web Docs | | Express | Express is the most popular Node web framework, and is the underlying library for a number of other popular Node web frameworks MDN Web Docs | | Routing | Routing is the mechanism by which requests are connected to some code. It is essentially the way you navigate through a website or web-application. Wilbert Schepenaar | | WRRC | ‘Web Request/Response Cycle’ The web is a cycle of requests and responses that flow between clients and servers. Jen Strong |

3 Things I Had Previously Heard of and Now Have Better Clarity On

  1. Node.js is a runtime environment intended for use OUTSIDE of a browser context
  2. Express.js is a Node web framework that allows us to write handlers for requests using HTTP verbs and routes and utilize view rendering engines to generate templated responses
  3. Continuous Integration is a process developers use to integrate code into a shared repository where the code is verified by automated build and testing. This ensures the code is both “good” as well as able to be successfully integrated into the existing code in the repository.

3 Things I Am Hoping to Learn More About in the Upcoming Lecture

  1. Error-First-Callbacks
  2. express.Router()
  3. .next()

I Am Most Excited About Trying to Implement or See How These Work:

Back to Main