Monday, August 23, 2010

RESTfull webservice

REST stands for Representational State Transfer. REST defines a set of architectural principles by which you can design Web services that focus on a system's resources where as SOAP focus on messaging.

To become REST full following constrains must be satisfied.
  • Client Server system
  • Must be stateless.
  • Support caching system
  • Uniformly accessible


Abstractions that make a Restful system, namely resources, representations, Uri’s, and the HTTP request types that make up the uniform interface used for client/server data transfers.

A Restful resource can be anything that is addressable over the Web.

A representation is a temporal state of the actual data located in some storage device at the time of a request.

A Uniform Resource Identifier, or URI, in a Restful web service is a hyperlink to a
resource


We have four specific actions that we can take upon resources—Create, Retrieve, Update, and Delete (CRUD)


We can now map our CRUD actions to the HTTP methods POST, GET, PUT, and DELETE as follows:

Data action HTTP protocol equivalent
CREATE          POST
RETRIEVE       GET
UPDATE          PUT
DELETE          DELETE


As of today there are a couple of JAX-RS libraries used by the Java community:
Jersey, Restlet, RestEasy etc

check other post for REST implementation in Jersey JAX-RS.

No comments:

Post a Comment

AWS Services

      1.         Identity Access Management (IAM): Used to control Identity (who) Access (what AWS resources).                   1....