问题
I am currently studying about REST interfaces for directory services and I'm confused about RESTful interfaces. When can we say that the design is completely RESTful?
回答1:
The REST architectural style
REST stands for Representational State Transfer. This architecture is protocol independent but it is frequently implemented over the HTTP protocol.
The REST architectural style was defined in the chapter 5 of Roy Thomas Fielding's PhD dissertation. And the following set of constraints was added to this architectural style:
- Client-server
- Stateless
- Cache
- Uniform interface
- Layered system
- Code-on-demand
Through the application of the constraints defined above, certain architectural properties are induced, such as visibility, portability, reliability, scalability and network efficiency.
What does RESTful mean?
The term RESTful could be compared to the term object-oriented. Programming languages could be considered object-oriented when they follow a set of concepts. An application can be considered RESTful when such application does not break the constraints defined above.
REST is a resource-oriented architecture. When implementing REST applications over the HTTP protocol, for example, the resource is identified by the URI and the operation over the resource is expressed by the HTTP method.
来源:https://stackoverflow.com/questions/36593435/when-can-we-say-a-design-is-completely-restful