Restful is representational state transfer. It is a network-based software architecture design. RESTful can be understood through its architectural core and four constraints.
REST’s full name is Representational State Transfer, which in Chinese means representational (Editor’s note: usually translated as representation) state transfer. It first appeared in 2000 in the doctoral thesis of Roy Fielding, one of the primary writers of the HTTP specification. He mentioned in the paper: "The purpose of writing this article is to understand and evaluate the architectural design of network-based application software on the premise of complying with the architectural principles, and to obtain an architecture with strong functions, good performance, and suitable for communication. "Architecture. REST refers to a set of architectural constraints and principles." If an architecture conforms to the constraints and principles of REST, we call it a RESTful architecture.
REST itself does not create new technologies, components or services, but the idea behind RESTful is to use the existing features and capabilities of the Web and make better use of some guidelines and constraints in existing Web standards. . Although REST itself is deeply influenced by Web technology, theoretically the REST architectural style is not bound to HTTP, but currently HTTP is the only instance related to REST. So the REST we describe here is also REST implemented through HTTP.
Core specifications and constraints of RESTful architecture: Unified interface
is divided into four sub-constraints:
1. Each Resources have a resource identifier, and the resource identifier of each resource can be used to uniquely identify the resource
2. Self-descriptiveness of the message
3. Self-descriptiveness of the resource.
4.HATEOAS Hypermedia As The Engine Of Application State(Hypermedia As The Engine Of Application State)
That is, the client can only get the next step through the information contained in each result returned by the server. Information required for the operation, such as which URL to send the request to, etc. In other words, a typical REST service does not require additional documents to indicate which URLs are used to access specific types of resources, but uses the response returned by the server to indicate what operations can be performed on the resource.
The above is the detailed content of How to understand restful. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

Dreamweaver Mac version
Visual web development tools

SublimeText3 English version
Recommended: Win version, supports code prompts!

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

WebStorm Mac version
Useful JavaScript development tools