RESTful 比 SOAP 快吗?什么时候使用其中之一? [英] Is RESTful faster than SOAP? and when to use one of them?
问题描述
重复:这是REST 服务的最佳用途是什么?" 等等.请关闭它.
Duplicate: This is a duplicate of "What are the best uses of REST services?" and many others. Please close it.
在网络开发中:
我是否应该很好地学习 RESTful 服务并在我未来的所有项目中使用它?它比 SOAP 服务更快吗?什么时候使用哪个?
Should i learn RESTful services very well and make all my future projects using it? Is it faster than SOAP services? When to use which?
在某些情况下,我应该选择其中一种吗?
Are there certain cases I should prefer one of them?
推荐答案
根据我的经验,SOAP 增加了一些开销,您可以通过创建 RESTful 服务来避免这些开销.话虽如此,在您的决定中,您应该考虑您的听众.如果您希望您的服务有各种各样的外部消费者,我会推荐 SOAP,因为有很多工具可以自动生成一个编程接口.
In my experience, SOAP adds some overhead that you can avoid by making a RESTful service. That being said, in your decision, you should consider your audience. If you are expecting to have a large variety of outside-world consumers of your service, I would recommend SOAP, because there are a lot of tools that automatically generate a programmatic interface to it.
某些网络服务(例如 PayPal)提供多种选择,因此您也可以考虑同时选择两者.
Some web services, like PayPal, offer multiple alternatives, so you could also consider choosing both.
这篇关于RESTful 比 SOAP 快吗?什么时候使用其中之一?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!