avatar
b*y
1
现在项目里面用REST. 看了rest web service那本书,里面对比REST和SOAP,
把REST吹得天花乱坠。老夫不觉得有那么神。关键是这个REST基于get/put/post
/delete什么的,我不觉得所有的operation都可以轻易归于这4类。
最主要的就是search (by multiple parameters),其实REST的实现就是hack
这get。而search还有一些fancy的模糊search啦,case-insensitive啦,
between date啦,还有sort order. REST好像不是那么万能啊。
avatar
g*g
2
REST is light-weighted, you can have both web frontend and
thick clients to cosume the same data.
On the other hand, SOAP is rpc style. For enterprise applications
that are calling remote functions, SOAP saves the trouble of
parsing XML and is usually easier to change.

【在 b******y 的大作中提到】
: 现在项目里面用REST. 看了rest web service那本书,里面对比REST和SOAP,
: 把REST吹得天花乱坠。老夫不觉得有那么神。关键是这个REST基于get/put/post
: /delete什么的,我不觉得所有的operation都可以轻易归于这4类。
: 最主要的就是search (by multiple parameters),其实REST的实现就是hack
: 这get。而search还有一些fancy的模糊search啦,case-insensitive啦,
: between date啦,还有sort order. REST好像不是那么万能啊。

avatar
k*r
3
how do you use web frontend with REST if the method you
need is not GET/POST?

【在 g*****g 的大作中提到】
: REST is light-weighted, you can have both web frontend and
: thick clients to cosume the same data.
: On the other hand, SOAP is rpc style. For enterprise applications
: that are calling remote functions, SOAP saves the trouble of
: parsing XML and is usually easier to change.

avatar
g*g
4
You are passing on plain xml on REST, you can define your
command whatever way you want. It just doesn't have to be
standard like SOAP.

【在 k***r 的大作中提到】
: how do you use web frontend with REST if the method you
: need is not GET/POST?

avatar
k*r
5
I mean the HTTP method, such as GET/PUT/POST/DELETE.
GET and POST are used a lot in web pages. I haven't seen
PUT and DELETE in HTML.
But it sounds like are we talking about different things :)

【在 g*****g 的大作中提到】
: You are passing on plain xml on REST, you can define your
: command whatever way you want. It just doesn't have to be
: standard like SOAP.

avatar
g*g
6
The idiom is using PUT for add, Delete for delete, post for update,
get for read. PUT and DELETE are in the html headers, I think they
exist since early versions of HTML.

【在 k***r 的大作中提到】
: I mean the HTTP method, such as GET/PUT/POST/DELETE.
: GET and POST are used a lot in web pages. I haven't seen
: PUT and DELETE in HTML.
: But it sounds like are we talking about different things :)

avatar
k*r
7
Hmmm...is that not the traditional non-REST idea?
REST uses the HTTP methods to create/delete/update objects.

【在 g*****g 的大作中提到】
: The idiom is using PUT for add, Delete for delete, post for update,
: get for read. PUT and DELETE are in the html headers, I think they
: exist since early versions of HTML.

avatar
b*y
8
这个light-weight vs rpc实际上是目前的implementation的区别吧?
为什么SOAP不能light-weight呢?
另外好像safari只支持get/put,这个也算是REST的一个大问题吧。

【在 g*****g 的大作中提到】
: REST is light-weighted, you can have both web frontend and
: thick clients to cosume the same data.
: On the other hand, SOAP is rpc style. For enterprise applications
: that are calling remote functions, SOAP saves the trouble of
: parsing XML and is usually easier to change.

avatar
g*g
9
No, SOAP is complicated since its self-contained.
You have to define all the data types in order to
be language neutral, and data types alone can be
very complicated.
REST on the other hand, it's an ad-hoc protocol,
you define your own, some best practices are recommended
but it's not a standard.

【在 b******y 的大作中提到】
: 这个light-weight vs rpc实际上是目前的implementation的区别吧?
: 为什么SOAP不能light-weight呢?
: 另外好像safari只支持get/put,这个也算是REST的一个大问题吧。

avatar
k*r
10
post

【在 b******y 的大作中提到】
: 这个light-weight vs rpc实际上是目前的implementation的区别吧?
: 为什么SOAP不能light-weight呢?
: 另外好像safari只支持get/put,这个也算是REST的一个大问题吧。

avatar
m*t
11

REST is still for web services, not for web browsing.
A browser isn't what you want to use to consume a
restful web service.

【在 b******y 的大作中提到】
: 这个light-weight vs rpc实际上是目前的implementation的区别吧?
: 为什么SOAP不能light-weight呢?
: 另外好像safari只支持get/put,这个也算是REST的一个大问题吧。

avatar
l*i
12
那些fancy的search可以作为get 的参数啊
例如search?ignorecase=true&order=desc&date_blah
REST主要强调啥咚咚都是资源,只不过传统web是人consume的资源,web service是计
算机consume的资源,HTTP协议本身就足够了。

【在 b******y 的大作中提到】
: 现在项目里面用REST. 看了rest web service那本书,里面对比REST和SOAP,
: 把REST吹得天花乱坠。老夫不觉得有那么神。关键是这个REST基于get/put/post
: /delete什么的,我不觉得所有的operation都可以轻易归于这4类。
: 最主要的就是search (by multiple parameters),其实REST的实现就是hack
: 这get。而search还有一些fancy的模糊search啦,case-insensitive啦,
: between date啦,还有sort order. REST好像不是那么万能啊。

avatar
t*e
13
rest主要用于B2C,newsfeed, weblog, ajax里用的很多。soap是B2B为主,有security
,
transaction等协议。SOA和BPM主要用soap,不过现在rest也慢慢加进来了。
你提到的那些功能,rest也都能实现。

【在 b******y 的大作中提到】
: 现在项目里面用REST. 看了rest web service那本书,里面对比REST和SOAP,
: 把REST吹得天花乱坠。老夫不觉得有那么神。关键是这个REST基于get/put/post
: /delete什么的,我不觉得所有的operation都可以轻易归于这4类。
: 最主要的就是search (by multiple parameters),其实REST的实现就是hack
: 这get。而search还有一些fancy的模糊search啦,case-insensitive啦,
: between date啦,还有sort order. REST好像不是那么万能啊。

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。