REST和POX之间的区别(Difference between REST and POX)

编程入门 行业动态 更新时间:2024-10-21 10:01:19
REST和POX之间的区别(Difference between REST and POX)

我真的无法区分REST和POX Web服务。 我的意思是,POX不能被视为具有XML消息定义的REST Web服务吗?

I really can't get the difference between REST and POX web services. I mean, couldn't POX be considered as a REST web service with XML message definitions?

最满意答案

这取决于您的“普通旧XML”包含的内容。

问题是,POX过去常常与SOAP进行比较。 SOAP是一种非常具体的方法,可以通过(大部分)HTTP进行XML,人们已经通过HTTP进行“普通的旧XML”了。 SOAP受到了很多批评,因为它使人们用POX做的事情变得复杂。 但我不会谈到这一点,我想说的是人们使用POX来做RPC 。

REST不是RPC。 在REST中,XML是资源的表示,而不是RPC中的消息定义。 还有一个非常重要的REST约束,人们似乎忘记或忽略了对返回的XML施加约束: 超媒体约束或HATEOAS 。

如果您想了解有关POX如何适应REST的更多信息,我建议您阅读本文: Richardson成熟度模型,迈向REST的荣耀 。

It depends on what your "Plain Old XML" contains.

The thing is, POX used to be compared with SOAP. SOAP is a very specific way to do XML over (mostly) HTTP and people were already doing "plain old XML" over HTTP. SOAP got a lot of criticism because it complicated the things people were already doing with POX. But I won't go into that, what I'm trying to say is that people used POX to do RPC.

REST isn't RPC. In REST, the XML is a representation of a resource, not a message definition as in RPC. There is also a very important REST constraint that people seem to forget or ignore that imposes constraints on the returned XML: the hypermedia constraint or HATEOAS.

If you want to find out more about how POX fits in REST, I recommend reading this article: Richardson Maturity Model, steps toward the glory of REST.

更多推荐

本文发布于:2023-07-24 10:50:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1244986.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:区别   REST   POX   Difference

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!