NOTE
2.11 RESTful
Historical notes on RESTful architecture, resources, representations, state transfer, and perceived limitations.
This is a historical learning note and may contain outdated or incomplete understanding.
1. What Is RESTful?
- A software architecture style based on the HTTP protocol.
- Resource Representational State Transfer.
1.1. Resource
A resource. Use a URI to locate a resource.
1.2. Representational
Representation layer. It can be formats such as txt or json.
Use the Accept and Content-Type fields in the HTTP request headers to specify it.
1.3. State Transfer
State transition. GET is used to retrieve resources, POST to create resources (and can also be used to update resources), PUT to update resources, and DELETE to delete resources.
2. Why Is RESTful Needed?
- Software has architecture, the Internet is software, so the Internet also has an architecture. RESTful is the architectural pattern of the Internet (HTTP).
3. Disadvantages of RESTful
- Resource-oriented programming is suitable only for CRUD; procedural and object-oriented programming are needed to handle truly complex business logic.
- REST is completely bound to HTTP and is not suitable for scenarios requiring high-performance transmission.
- REST is not conducive to transaction support.
- REST has no transmission-reliability support.
- REST lacks the ability to process resources partially and in batches.
Discussion
Sign in with GitHub to comment. Discussions are stored as GitHub Issues.View on GitHub