知识卡片
REST统一接口隔离实现
REST 通过资源、无状态请求、可缓存响应、统一接口和分层系统约束服务交互。消费者按资源标识与统一操作使用能力,无须知道背后是数据库还是其他服务;每次请求仍需带足处理所需上下文,不能把跨请求会话状态隐含在服务端。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
- · 消费者与接口风格
原书出处 · 1 处
- · 查看原书依据
REpresentation State Transfer (REST) is a set of architectural constraints, most commonly applied using HTTP as the underlying transport protocol. Roy Fielding’s dissertation “Architectural Styles and the Design of Network-based Software Architectures” provides a complete definition of REST. From a practical perspective, to be considered RESTful your API must ensure that: A producer-to-consumer interaction is modeled where the producer models resources the consumer can interact with.
参考来源
- 位置:《Mastering API Architecture》第1章《Design, Build, and Specify APIs》之《Introduction to REST》(源文件:_epub-src/OEBPS/ch01.xhtml)
- 结论依据:原文把 REST 定义为架构约束,并逐一说明资源建模、无状态、缓存提示、统一接口和后端分层隐藏。
- 原始内容:REpresentation State Transfer (REST) is a set of architectural constraints, most commonly applied using HTTP as the underlying transport protocol. Roy Fielding’s dissertation “Architectural Styles and the Design of Network-based Software Architectures” provides a complete definition of REST. From a practical perspective, to be considered RESTful your API must ensure that: A producer-to-consumer interaction is modeled where the producer models resources the consumer can interact with.