由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - REST
相关主题
soa变成rest,大家公司在用哪个?Web service framework choice?
java SOAP比restful难学吗?哪位大牛可以总结一下各种java框架的基本思想,优于其它框架的地方以及适用范围。
Java vs C++ --> What is the ultimate direction?what do u think of SOAP vs REST ( or even FB's thrift server)?
Axis1.2RC3问题SOAP over JMS with CXF frame?
Web Services 现在很热吗?Java Web Services Tutorial 这个是最新的吗?
Java/J2EE的书rest vs soap (转载)
database 是 postgresql, server 不用JBOSS 还能用啥?如何学习用Java开发Web Service?
怎么把servlet publish成web services新手问题 -- web service怎么Authentication and Authorization
相关话题的讨论汇总
话题: rest话题: soap话题: delete话题: get话题: put
进入Java版参与讨论
1 (共1页)
b******y
发帖数: 1684
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好像不是那么万能啊。
g*****g
发帖数: 34805
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好像不是那么万能啊。

k***r
发帖数: 4260
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.

g*****g
发帖数: 34805
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?

k***r
发帖数: 4260
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.

g*****g
发帖数: 34805
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 :)

k***r
发帖数: 4260
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.

b******y
发帖数: 1684
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.

g*****g
发帖数: 34805
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的一个大问题吧。

k***r
发帖数: 4260
10
post

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

m******t
发帖数: 2416
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的一个大问题吧。

l***i
发帖数: 289
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好像不是那么万能啊。

t*******e
发帖数: 684
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好像不是那么万能啊。

1 (共1页)
进入Java版参与讨论
相关主题
新手问题 -- web service怎么Authentication and AuthorizationWeb Services 现在很热吗?
现在做jasper report,amazon web services了,goodbug我要经常向你请教了。Java/J2EE的书
这个UDDI是咋回事儿?求讲解。。。database 是 postgresql, server 不用JBOSS 还能用啥?
请推荐一下RESTful WS Framework怎么把servlet publish成web services
soa变成rest,大家公司在用哪个?Web service framework choice?
java SOAP比restful难学吗?哪位大牛可以总结一下各种java框架的基本思想,优于其它框架的地方以及适用范围。
Java vs C++ --> What is the ultimate direction?what do u think of SOAP vs REST ( or even FB's thrift server)?
Axis1.2RC3问题SOAP over JMS with CXF frame?
相关话题的讨论汇总
话题: rest话题: soap话题: delete话题: get话题: put