"REST,
an architectural style for building distributed hypermedia driven applications,
involves building Resource-Oriented Architecture (ROA) by defining resources
that implement uniform interfaces using standard HTTP verbs (GET, POST, PUT,
and DELETE), and that can be located/identified by a Uniform Resource
Identifier (URI)."
Any Service which follows this
REST architecture style is called as RESTful service. It became very popular
because of it behavior, it is similar to the website i.e we can load the server
information using web URL n the browser. Similarly we can also access/modify
the server resource using URL in RESTful service
- RESTful service will allow the client
(written in different language)to access or modify the resource in the
server using URL.
- RESTful service uses the http protocol
for its communication and it is
stateless
- RESTful service can transfer the data in XML,JSON,RSS,ATOM
Implementing
REST Service
SOAP
|
POX(plain-old
XML)
|
REST
|
|
|
|
This basic REST design
principle establishes a one-to-one mapping between create, read, update, and
delete (CRUD) operations and HTTP methods. According to this mapping
- To create a resource on the server, use POST.
- To retrieve a resource, use GET.
- To change the state of a resource or to update
it, use PUT.
- To remove or delete a resource, use DELETE.
RESTful service can be
created by using WebGetAttribute and WebInvokeAttribute attribute. RESTful
service has provided separate attribute for GET operation (Web Get) because it
want to make use of complete features. Other operations like POST, PUT, and
DELETE will come under the Web Invoke attribute.
No comments:
Post a Comment