RESTful-note

  1. 5 principles
  2. what can be achieved when they are followed:
  3. Documenting RESTful APIs with Swagger

RESTful WEB API design with nodejs 10

5 principles

Let’s look at the key principles around the HTTP and URI standards, sticking to which will make your HTTP application a RESTful service-enabled application:

Everything is a resource
Each resource is identifiable by aunique identifier(URI)
Resources are manipulated via standard HTTP methods
Resources can have multiple representations –(forExample data can be send by Json or XML)
Communicate with resources in a stateless manner

Posting only the updated price is not stateless, as it implies that the application is aware that the resource has a price field, that is, it knows its state.

All this complexity was caused mainly because the initial idea of the web service was to execute business logic remotely, not to transport large amounts of data.

what can be achieved when they are followed:

  • Separation of the representation and the resource
  • Visibility
  • Reliability
  • Scalability
  • Performance

If you are familiar with SOAP web services, you may have heard of theWeb Service Definition Language(WSDL).

Documenting RESTful APIs with Swagger

(https://swagger.io/swagger-ui/)

A fully fledged currency requires both a central bank and a treasury.

完善的货币要求央行和财政部两者兼备。


--Write by Marcustar,关关雎鸠,在河之洲
目录
Download 相册