REST 和 POX 的区别 [英] Difference between REST and POX

查看:59
本文介绍了REST 和 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?

推荐答案

这取决于您的Plain Old XML"包含的内容.

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

问题是,POX 曾经与 SOAP 进行比较.SOAP 是通过(主要是)HTTP 执行 XML 的一种非常特殊的方式,人们已经在通过 HTTP 执行普通的旧 XML".SOAP 受到了很多批评,因为它使人们已经用 POX 做的事情变得复杂了.但我不会深入讨论,我想说的是人们使用 POX 来做 RPC.

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

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.

如果您想了解有关 POX 如何适用于 REST 的更多信息,我建议您阅读这篇文章:Richardson Maturity模型,迈向REST的辉煌.

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.

这篇关于REST 和 POX 的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆