DZone 's Guide to


· Java Zone ·
Free Resource

REST is becoming the buzz word of this year. After spending 4 years developing an open-source REST web services framework you might think I should be pleased. Well, not that much.

Actually you have 2 REST that I would call the Pure REST and the RESTfull way. The pure REST is the REST were the web services is resource based using the HTTP verbs (POST, GET, PUT, DETELE) to manage the resources. Parameters are in the URL path. This one is back up by JSR 311 e.g. HTTP DELETE http://www.mysite.com/service/15002/

The RESTfull way is where request are done with GET and POST and parameters are in the URL query. This one is back up by Axis or Yahoo! API.

I largely support the RESTfull way

Here are the pure REST problems:

  • The way we think of web services is not resource based.
  • There is no details on how to handle optional parameters.
  • There is no details on how to get the specification of the web service.
  • There is no details on how to assign types and contrainst to your parameters.
  • It not easy to tests (except for GET).
The only advantage named is the possibility to cache GET request as you know it won't change any data. I think that this argument is defining the architecture based on premature optimization.

Does that mean that the RESTfull way can't cache? No but then you need to do it (or specify it) based on the service called.

I've seen at presentations and also saw some discussion on the net and every time they have to name examples they come with the Yahoo REST api which actually uses the RESTfull way.

PS: In XINS there is also one of the demo which is pure REST but pure REST is not the default protocol.

From http://www.jroller.com/agoubard/entry/rest_vs_rest


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}