补充b族维生素有什么好处| 梦见被蛇缠身是什么意思| 续弦是什么意思| 夏天适合种什么菜| 盆腔肿物是什么意思| eb病毒igg抗体阳性是什么意思| 夜尿多是什么原因| 音调是什么| 蚊子喜欢什么血型| 尘肺病吃什么能排出尘| 女的肾虚是什么原因引起的| 3岁小孩不会说话是什么原因| 湿气是什么原因引起的| 小猫为什么一直叫| 肠胃湿热吃什么药| 六月初六是什么节日| 腿弯后面疼是什么原因| 梦见做手术是什么意思| 11月1日是什么星座| 大拇指旁边是什么指| 缺少雌激素的女性会有什么症状| 嗓子哑了吃什么药| 666什么意思| 肚子大挂什么科| 火花是什么| 乙肝表面抗原携带者什么意思| 白酒兑什么饮料最好喝| 精子为什么叫怂| 卯五行属什么| 口加一笔变成什么字| 金刚芭比什么意思| 家庭养什么狗最干净| 海藻面膜有什么作用| 霉菌性阴炎是什么原因引起的女| pet-ct检查主要检查什么| 山东登州府现在叫什么| 女真族现在是什么族| 噤若寒蝉是什么意思| 三个子字念什么| gi什么意思| 胆囊切除后可以吃什么水果| 胆红素高吃什么食物能降得快| 黑头发有什么好处脑筋急转弯| 心尖尖是什么意思| 看舌头挂什么科| 激素水平是什么意思| 吃石斛有什么好处| 脊柱炎是什么症状| 三叉神经痛挂什么科就诊| 孕晚期为什么会脚肿| 痰多是什么原因造成的| 手掌纹路多且杂乱是为什么| 冥币是什么意思| 虾皮有什么营养价值| 胆红素升高是什么原因| 牙肿了吃什么消炎药| 周杰伦是什么星座| 雄黄是什么东西| 什么是全日制本科| 心脏不好吃什么水果好| 心肌梗塞有什么症状| asd什么意思| 什么牌的笔记本电脑好| 智齿发炎是什么原因| 肺栓塞有什么症状| 南京立冬吃什么| 女生为什么会痛经| agoni什么意思| 男人怕冷是什么原因| 戴笠什么军衔| 雪球是什么| 控制欲强的人最怕什么| 绝代双骄是什么意思| 可燃冰属于什么能源| 阴挺是什么意思| 一九三七年属什么生肖| 脚心凉是什么原因| 孕妇补铁吃什么| 跳蚤是什么样的图片| 升字是什么生肖| 吃什么药| 仓鼠怀孕有什么特征| 胃息肉是什么症状| 什么护肤品| 大姑姐最怕弟媳什么| 人为什么会得肿瘤| lee是什么品牌| 血尿是什么原因| 刀子嘴豆腐心什么意思| 孩子走路晚是什么原因| 腰腿疼痛吃什么药效果好| 老赖是什么意思| 陌路人是什么意思| 荷叶又什么又什么| 12月13日是什么日子| ggdb是什么牌子| 睡觉开风扇有什么危害| 同化什么意思| 非农业户口是什么意思| 结婚8年是什么婚| 窘迫什么意思| 什么是性病| 韩愈字什么| 上善若水下一句是什么| 7月8号是什么星座的| 烤鱼一般用什么鱼| 心悸是什么原因造成的呢| 陈皮泡酒喝有什么功效和作用| 官宣是什么意思| 主任是什么级别| 一什么新月| 什么叫阵雨| winner是什么意思| 贵子是什么意思| 为什么会得近视眼| 玫瑰花像什么| 冲鼠煞北是什么意思| 林彪为什么要叛逃| 鲁迅是什么样的人| 菠萝和凤梨有什么区别| 全脂乳粉是什么| 情感和感情有什么区别| oh什么意思| 什么是西米| 中国文字博大精深什么意思| 以示是什么意思| 线索细胞阳性是什么意思| 柠檬酸是什么| 什么化妆品好用| 怀孕牙龈出血是什么原因| 10.8号是什么星座| 开团什么意思| 沙门氏菌用什么药| chop是什么意思| 一般什么人戴江诗丹顿| 手麻是什么情况| 上不来气吃什么药| 肺结核挂什么科| 消肿吃什么食物好| 甲减喝什么药| 什么是比特币| 脚气是什么菌感染| 声声慢是什么意思| 四时是什么时辰| 唉什么意思| 牛头不对马嘴是什么意思| 口出狂言是什么生肖| 手抖吃什么药马上控制| 头孢不能和什么一起吃| 胃烧心吃什么药| 办护照照片有什么要求| 中风吃什么药好| 公斤和斤有什么区别| 25岁今年属什么生肖| 什么原因引起荨麻疹| 秋葵不适宜什么人吃| 农历十月是什么月| mom什么意思| 仓鼠是什么科动物| 7月27日什么星座| 什么叫压缩性骨折| 处暑是什么时候| 夏天穿什么衣服比较凉爽| 家里为什么突然有床虱| 肌酐偏低是什么意思| 血糖高初期有什么症状| 夏天喝什么茶| 心悸是什么原因引起的| 什么是干槽症| 防晒什么时候涂| 6月份是什么星座| 花生不能和什么一起吃| 玉屏风颗粒治什么病| 形婚是什么| 代沟是什么意思| 一个马一个尧读什么| 长时间憋尿会有什么影响| 兔子尾巴像什么| 激素六项都是查什么| 头伏饺子二伏面三伏吃什么| 牙齿酸是什么原因| homme是什么意思| 省长是什么级别| 中央委员什么级别| 家里有蚂蚁是什么原因| 县副局长是什么级别| 白带发黄吃什么药| 厍是什么意思| 做病理意味着什么| hvb是什么意思| 红枣和枸杞一起泡水喝有什么作用| 甲状腺结节是什么意思| 梦见好多人是什么意思| 心烦意乱吃什么药| 沙茶酱是什么做的| 皮下紫癜是什么引起的| 沁人心扉什么意思| 师五行属什么| 智齿是什么| 什么食物含硒量最高| 梦见给死人烧纸钱是什么意思| 人为什么打哈欠| 孕吐吃什么可以缓解| 字是什么结构| 为什么会长斑| 昏厥是什么意思| 内服什么可以美白全身| 后装治疗是什么意思| 做梦大便是什么意思| 臭鱼烂虾什么意思| 活着的意义是什么| 大便溏泄是什么意思| m代表什么单位| 生姜和红枣煮水喝有什么作用| 谷子是什么意思| 6月15日是什么星座| 梦见母亲去世预示什么| 顾名思义什么意思| polo是什么意思| 手上长小水泡是什么原因| 02年的属什么| 脚背疼挂什么科| 五常指的是什么| 润滑油可以用什么代替| 吃什么受孕率又快又高| la是什么品牌| 碳酸盐质玉是什么玉| 曹操属什么生肖| 阿莫西林不能和什么药一起吃| 困惑是什么意思| 为什么不可以| 梦到发洪水是什么征兆| 腿肿是什么原因引起的怎么办| 男人分手是什么感觉| 杜仲泡水喝有什么功效| 女人阴唇发黑是什么原因| 什么的眼光| 万花筒是什么| 胎儿没有胎心是什么原因| 什么饮料健康| 插画师是做什么的| 为什么脚会肿起来是什么原因| 脑炎是什么病严重吗| 6月12日是什么节日| 精神小伙是什么意思| 汉朝后面是什么朝代| 淋巴在什么部位| 假体隆胸什么材料好| 经常想吐恶心是什么原因| 什么雪糕最好吃| 证过二是什么意思| 牵牛花是什么颜色的| 血压偏低吃什么| 榕字五行属什么| 蟑螂讨厌什么味道| 核磁共振检查什么| 别出心裁的裁是什么意思| 西安和咸阳什么关系| 肿瘤出血意味着什么| 氯雷他定片是什么药| 发烧能吃什么水果| 喉咙有痰挂什么科| 鱼缸底部铺什么好| 预包装食品指的是什么| 百度Jump to content

为了去年的气荒不再上演 中国开始布局地下储气库天然气

Checked
Page protected with pending changes
From Wikipedia, the free encyclopedia

REST (Representational State Transfer) is a software architectural style that was created to describe the design and guide the development of the architecture for the World Wide Web. REST defines a set of constraints for how the architecture of a distributed, Internet-scale hypermedia system, such as the Web, should behave. The REST architectural style emphasizes uniform interfaces, independent deployment of components, the scalability of interactions between them, and creating a layered architecture to promote caching to reduce user-perceived latency, enforce security, and encapsulate legacy systems.[1]

REST has been employed throughout the software industry to create stateless, reliable, web-based applications. An application that adheres to the REST architectural constraints may be informally described as RESTful, although this term is more commonly associated with the design of HTTP-based APIs and what are widely considered best practices regarding the "verbs" (HTTP methods) a resource responds to, while having little to do with REST as originally formulated—and is often even at odds with the concept.[2]

Principle

[edit]

The term representational state transfer was introduced and defined in 2000 by computer scientist Roy Fielding in his doctoral dissertation. It means that a server will respond with the representation of a resource (today, it will most often be an HTML document) and that resource will contain hypermedia links that can be followed to make the state of the system change. Any such request will in turn receive the representation of a resource, and so on.

An important consequence is that the only identifier that needs to be known is the identifier of the first resource requested, and all other identifiers will be discovered. This means that those identifiers can change without the need to inform the client beforehand and that client and server must be inherently loosely coupled.

History

[edit]
Roy Fielding speaking at OSCON 2008

The Web began to enter everyday use in 1993–1994, when websites for general use started to become available.[3] At the time, only a fragmented description existed of the Web's architecture, and there was pressure within the industry to agree on a standard for the Web interface protocols. For instance, several experimental extensions had been added to the communication protocol (HTTP) to support proxies, and more extensions were being proposed, but there was a need for a formal Web architecture with which to evaluate the impact of these changes.[4]

The W3C and IETF working groups together started work on creating formal descriptions of the Web's three primary standards: URI, HTTP, and HTML. Roy Fielding was involved in the creation of these standards (specifically HTTP 1.0 and 1.1, and URI), and during the next six years he created the REST architectural style, testing its constraints on the Web's protocol standards and using it as a means to define architectural improvements — and to identify architectural mismatches. Fielding defined REST in his 2000 PhD dissertation "Architectural Styles and the Design of Network-based Software Architectures"[1][5] at UC Irvine.

To create the REST architectural style, Fielding identified the requirements that apply when creating a world-wide network-based application, such as the need for a low entry barrier to enable global adoption. He also surveyed many existing architectural styles for network-based applications, identifying which features are shared with other styles, such as caching and client–server features, and those which are unique to REST, such as the concept of resources. Fielding was trying to both categorise the existing architecture of the current implementation and identify which aspects should be considered central to the behavioural and performance requirements of the Web.

By their nature, architectural styles are independent of any specific implementation, and while REST was created as part of the development of the Web standards, the implementation of the Web does not obey every constraint in the REST architectural style. Mismatches can occur due to ignorance or oversight, but the existence of the REST architectural style means that they can be identified before they become standardised. For example, Fielding identified the embedding of session information in URIs as a violation of the constraints of REST which can negatively affect shared caching and server scalability. HTTP cookies also violate REST constraints[4] because they can become out of sync with the browser's application state, making them unreliable; they also contain opaque data that can be a concern for privacy and security.

Architectural properties

[edit]

The REST architectural style is designed for network-based applications, specifically client-server applications. But more than that, it is designed for Internet-scale usage, so the coupling between the user agent (client) and the origin server must be as loose as possible to facilitate large-scale adoption.

The strong decoupling of client and server together with the text-based transfer of information using a uniform addressing protocol provided the basis for meeting the requirements of the Web: extensibility, anarchic scalability[6] and independent deployment of components, large-grain data transfer, and a low entry-barrier for content readers, content authors and developers.

An entity–relationship model of the concepts expressed in the REST architectural style

The constraints of the REST architectural style affect the following architectural properties:[1][7]

  • Performance in component interactions, which can be the dominant factor in user-perceived performance and network efficiency;[8]
  • Scalability allowing the support of large numbers of components and interactions among components;
  • Simplicity of a uniform interface;
  • Modifiability of components to meet changing needs (even while the application is running);
  • Visibility of communication between components by service agents;
  • Portability of components by moving program code with the data;
  • Reliability in the resistance to failure at the system level in the presence of failures within components, connectors, or data.[8]

Architectural constraints

[edit]

The REST architectural style defines six guiding constraints.[7][9] When these constraints are applied to the system architecture, it gains desirable non-functional properties, such as performance, scalability, simplicity, modifiability, visibility, portability, and reliability.[1]

The formal REST constraints are as follows:[10]

  • Client/Server – Clients are separated from servers by a well-defined interface
  • Stateless – A specific client does not consume server storage when the client is "at rest"
  • Cache – Responses indicate their own cacheability
  • Uniform interface
  • Layered system – A client cannot ordinarily tell whether it is connected directly to the end server, or to an intermediary along the way
  • Code on demand (optional) – Servers are able to temporarily extend or customize the functionality of a client by transferring logic to the client that can be executed within a standard virtual machine

Uniform interface

[edit]

The uniform interface constraint is fundamental to the design of any RESTful system.[1] It simplifies and decouples the architecture, which enables each part to evolve independently. The four constraints for this uniform interface are:

  • Resource identification in requests: Individual resources are identified in requests using URIs. The resources themselves are conceptually separate from the representations that are returned to the client. For example, the server could send data from its database as HTML, XML or as JSON—none of which are the server's internal representation.
  • Resource manipulation through representations: When a client holds a representation of a resource, including any metadata attached, it has enough information to modify or delete the resource's state.
  • Self-descriptive messages: Each message includes enough information to describe how to process the message. For example, which parser to invoke can be specified by a media type.[1]
  • Hypermedia as the engine of application state (HATEOAS) – Having accessed an initial URI for the REST application—analogous to a human Web user accessing the home page of a website—a REST client should then be able to use server-provided links dynamically to discover all the available resources it needs. As access proceeds, the server responds with text that includes hyperlinks to other resources that are currently available. There is no need for the client to be hard-coded with information regarding the structure of the server.[11]

Classification models

[edit]

Several models have been developed to help classify REST APIs according to their adherence to various principles of REST design, such as

See also

[edit]

References

[edit]
  1. ^ a b c d e f Fielding, Roy Thomas (2000). "Chapter 5: Representational State Transfer (REST)". Architectural Styles and the Design of Network-based Software Architectures (Ph.D.). University of California, Irvine. Archived from the original on 2025-08-04. Retrieved 2025-08-04.
  2. ^ Fielding, Roy T. (2025-08-04). "REST APIs must be hypertext driven". roy.gbiv.com. Archived from the original on 2025-08-04. Retrieved 2025-08-04.
  3. ^ Couldry, Nick (2012). Media, Society, World: Social Theory and Digital Media Practice. London: Polity Press. p. 2. ISBN 9780745639208. Archived from the original on 2025-08-04. Retrieved 2025-08-04.
  4. ^ a b Fielding, Roy Thomas (2000). "Chapter 6: Experience and Evaluation". Architectural Styles and the Design of Network-based Software Architectures (Ph.D.). University of California, Irvine. Archived from the original on 2025-08-04. Retrieved 2025-08-04.
  5. ^ "Fielding discussing the definition of the REST term". groups.yahoo.com. Archived from the original on November 5, 2015. Retrieved 2025-08-04.
  6. ^ Fielding, Roy Thomas (2000). "Chapter 4: Designing the Web Architecture: Problems and Insights". Architectural Styles and the Design of Network-based Software Architectures (Ph.D.). University of California, Irvine. Retrieved 2025-08-04.{{cite thesis}}: CS1 maint: url-status (link)
  7. ^ a b Erl, Thomas; Carlyle, Benjamin; Pautasso, Cesare; Balasubramanian, Raj (2012). "5.1". SOA with REST: Principles, Patterns & Constraints for Building Enterprise Solutions with REST. Upper Saddle River, New Jersey: Prentice Hall. ISBN 978-0-13-701251-0.
  8. ^ a b Fielding, Roy Thomas (2000). "Chapter 2: Network-based Application Architectures". Architectural Styles and the Design of Network-based Software Architectures (Ph.D.). University of California, Irvine. Archived from the original on 2025-08-04. Retrieved 2025-08-04.
  9. ^ Richardson, Leonard; Ruby, Sam (2007). RESTful Web Services. Sebastopol, California: O'Reilly Media. ISBN 978-0-596-52926-0.
  10. ^ "What is REST API?". www.visual-paradigm.com. Archived from the original on 2025-08-04. Retrieved 2025-08-04.
  11. ^ Gupta, Lokesh (2 June 2018). "REST HATEOAS". REST API Tutorial. RESTfulAPI.net. Archived from the original on 7 April 2019. Retrieved March 10, 2019.
  12. ^ "Classification of HTTP APIs". algermissen.io. Archived from the original on 2025-08-04. Retrieved 2025-08-04.
  13. ^ Ivan Salvadori, Frank Siqueira (June 2015). "A Maturity Model for Semantic RESTful Web APIs". Conference: Web Services (ICWS), 2015 IEEE International Conference OnAt. New York. Archived from the original on 2025-08-04. Retrieved 2025-08-04 – via ResearchGate.


Further reading

[edit]
什么是周岁 做梦梦到男朋友出轨了是什么意思 汗斑用什么药膏好 男扮女装是什么意思 肠粉是什么做的
马天尼是什么酒 多汗症是什么原因 msms筛查是什么意思 3月3日什么星座 男人遗精是什么原因
当兵什么时候体检 晚上左眼皮跳预示什么 舌头干燥是什么原因 红十字会是干什么的 鬼针草能治什么病
哀鸿遍野是什么意思 style什么意思 士人是什么意思 检查血液挂什么科 药师是干什么的
张国荣属什么生肖liaochangning.com 9点到11点是什么经络hcv8jop0ns7r.cn 漫山遍野是什么生肖hcv8jop7ns6r.cn 阴道菌群失调用什么药hcv9jop0ns4r.cn 骨刺是什么hcv9jop1ns1r.cn
酸菜鱼可以放什么配菜hcv8jop9ns5r.cn 什么什么生机hcv9jop1ns9r.cn 美甲什么颜色显手白cl108k.com 什么叫梗hcv8jop7ns6r.cn 激素水平是什么意思hcv9jop0ns4r.cn
宝宝咳嗽流鼻涕吃什么药hcv9jop1ns9r.cn 口苦吃什么中成药hcv8jop5ns6r.cn hcg什么意思mmeoe.com 梦见自己流产了是什么征兆hcv9jop6ns2r.cn e6e7阳性是什么意思hcv7jop6ns2r.cn
三七甘一是什么意思hcv7jop9ns6r.cn 肾疼是因为什么hcv8jop7ns4r.cn 经血是什么血hcv9jop4ns0r.cn 688是什么意思0735v.com 小狗得细小是什么症状youbangsi.com
百度