Web服务 – REST(RESTful)Web服务是否与HTTP绑定(耦合或需要)?

Web服务 – REST(RESTful)Web服务是否与HTTP绑定(耦合或需要)?,第1张

概述标题基本上都说明了,REST真的与HTTP绑定还是协议无关? 因为我刚读了几篇关于REST的文章,所以我遇到了两个意见,所以我不知道哪一个是正确的. 请允许我引用 “RESTful Web Services”这本书(粗体是我的): The Story of the REST REST is simple, but it’s well defined and not an excuse for im 标题基本上都说明了,REST真的与http绑定还是协议无关?
因为我刚读了几篇关于REST的文章,所以我遇到了两个意见,所以我不知道哪一个是正确的.解决方法 请允许我引用 “RESTful Web Services”这本书(粗体是我的):

The Story of the REST

REST is simple,but it’s well defined and not an
excuse for implementing web services as half-assed web sites because
“they’re the same.” Unfortunately,until Now the main REST reference
was chapter five of Roy FIElding’s 2000 Ph.D. dissertation,which is a
good read for a Ph.D. dissertation,but leaves most of the real-world
questions unanswered. That’s because it presents REST not as an
architecture but as a way of judging architectures. The term “RESTful”
is like the term “object-orIEnted.” A language,a framework,or an
application may be designed in an object-orIEnted way,but that
doesn’t make its architecture the object-orIEnted architecture. Even
in object-orIEnted languages like C++ and Ruby,it’s possible to write
programs that are not truly object-orIEnted. http in the abstract does
very well on the criteria of REST. (It ought to,since FIElding
co-wrote the http standard and wrote his dissertation to describe the
architecture of the Web.) But real web sites,web applications,and
web services often betray the principles of REST. (…)

请注意,在第二个粗体中,他说:“http非常适合REST”,而不是“REST适合/依赖于http”.

因此,简而言之:不,术语“REST”不一定与http相关联. RESTful Web服务只是遵循RESTful架构的Web服务,希望实现FIElding在其论文中列出的好处(例如无状态,可寻址性等).

创建RESTful Web服务的一种方法是根据资源(而不是SOAP样式使用的 *** 作)来考虑应用程序.结合正确使用http(其方法和状态代码)的这种思维方式可以导致支持REST的架构(并且具有所有好处)FIElding的论文枚举.

@H_419_51@ 总结

以上是内存溢出为你收集整理的Web服务 – REST(RESTful)Web服务是否与HTTP绑定(耦合或需要)?全部内容,希望文章能够帮你解决Web服务 – REST(RESTful)Web服务是否与HTTP绑定(耦合或需要)?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1068012.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-26
下一篇 2022-05-26

发表评论

登录后才能评论

评论列表(0条)

保存