REST is a different style of designing web services. In a typical SOAP/WSDL service you expose to the network a small number of "service" objects (usually one), and each object can expose a large number of operations with custom names. A RESTful design is more data-oriented. The dataset is exposed to the network through a large number of standard HTTP objects called resources. Each resource supports a small, standardized set of operations (GET, PUT, DELETE...) that's always the same.
In a SOAP/WSDL service you devote your ingenuity to defining an API, a set of operations your service will expose. In a RESTful design you work on exposing your dataset through resources and connecting them together. You might think of a RESTful web service as a data structure, like a linked list, exposed to the network as a set of interlinked Web pages.
The most basic advantage of a RESTful design is that it works more or less like the World Wide Web. Most of the specific advantages follow from this. For instance, you can build a client for a service with nothing but an HTTP client library--there are lots of those for every language and they all work the same way. Every resource has its own URI, which means clients can pass around entry points into your service and combine your service with others. Resources can link to each other, which means the service can guide a client through a complex multi-step operation. You can scale up your service using the standard tools developed for websites: caching proxies, HTTP load balancers, etc.
I could go on but I feel like I don't have the space here to defend all these assertions (and Sam's better at it than I am). Hopefully you get the picture. The book has more details on all these things, especially in chapter 8 under "This Stuff Matters".
The big Java frameworks are not really capable of representing a RESTful design, so you will have to learn a new framework. Right now, the most popular RESTful Java framework is Restlet (http://www.restlet.org/). JSR 311 will create a common ground for RESTful frameworks in Java.
Joined: Jun 08, 2007
Oh, I should have added that you can implement a RESTful web service using nothing but the Servlet API, just as you can implement a client using only an HTTP library. And JAX-WS 2.0 can supposedly expose RESTful services. But no matter what, you'll have to change the way you think about web services. REST is a style, not a technology.
Joined: Dec 22, 2006
Thank you so much for sharing such a wonderful information. I have recently started implementing web services in my project and would like to learn more about REST too.