REST系统和基于REST的系统之间的区别是什么?
从我读到的一些东西来看,所谓的REST服务实际上就是RESTful服务。那么两者之间的区别是什么呢?
REST系统和基于REST的系统之间的区别是什么?
从我读到的一些东西来看,所谓的REST服务实际上就是RESTful服务。那么两者之间的区别是什么呢?
当前回答
在Richardson成熟度模型中定义了4个级别的API。这些被定义为:
level 0: any system that has a single endpoint for all its apis(SOAP or RPC fall in this category). Level 0 apis can also resemble "commands". level 1: a ResourceUri described system. This is a system that defines multiple entity-based URIs (instead of having a single endpoint like a level 0 systems would). These URIs can use different http actions (POST, GET, PUT, etc) to implement different actions against that resource. level 2: aka level 1 w/ a compliant use of Standard HTTP methods/verbs and multi status code responses level 3: aka level 2 plus HATEOAS (hypermedia included in the response which describes additional calls you can make)
虽然级别1、级别2和级别3可以被认为是REST系统,但只有更严格的级别(即级别2和级别3)才被认为是RESTful的。
所以本质上所有的RESTful api都是REST api,但并不是所有的REST api都是RESTful的
理查德森成熟度模型的定义
其他回答
基于REST的服务称为“REST式服务”。
来源:多布斯博士档案
具象状态传输(Representational State Transfer, REST)是一种用于分布式超媒体系统(如万维网)的软件体系结构风格。2000年,罗伊·菲尔丁(Roy Fielding1[2])在他的博士论文中引入并定义了“具象状态转移”(Representational State Transfer)一词。Fielding是超文本传输协议(HTTP)规范1.0和1.1版本的主要作者之一。 遵循REST约束被称为“RESTful”。资料来源:维基百科
REST(表示状态传输)是一种用于创建WebServices的体系结构。
and
RESTful是一种使用REST体系结构编写服务的方式。RESTful服务公开资源,以识别与客户机交互的目标。
REST是一种用于分布式软件的软件体系结构
遵循REST约束被称为“RESTful”。
如今,它被广泛用于构建web服务,作为SOAP的替代方案。
这里有一些链接需要检查
http://en.wikipedia.org/wiki/Representational_State_Transfer http://www.computerworld.com/s/article/297424/Representational_State_Transfer_REST_ http://www.ibm.com/developerworks/webservices/library/ws-restful/
正如Jason在评论中所说,RESTful只是作为一个形容词,用来描述尊重REST约束的东西。