Today I will put some detail on REST,a architecture which is just hot now a days among architect,personally I felt this is the one of the simplest architecture.Although it's not easy to implement without getting thorow understanding of it.
Representational State Transfer(REST) is architectural style for distributed hypermedia systems .
This complete architecture use few elements like Resource,URI,Verb,Representation,Component and Connector etc.
Let me explain each term with detail:
* what is Resource?
-The key abstraction of information in REST is a resource.A resource can be any meaningful functional object which can be addressed and can act upon a request
* What is URI?
- The address using which resource is being addressed is URI(uniform resource identifier ).It's having it's own structure to represent any object.It's composed of five parts called scheme, host, path, query, and fragment e.g. http://xyz.com/Resource/pageno=10#bookmark
If it is internal than you can refer
"/WebProject/resources/getcontent?page=HomePage§ion=2"
* What is Verb?
-In REST all operation performed using following verbs:GET, PUT, POST, and DELETE
The GET verb is used to read a resource.The PUT and DELETE verbs allow a request to alter the state of a resource atomically.POST create a new entry in the collection.The POST operation is very generic and no specific meaning can be attached to it. In general, use POST when only a subset of a resource needs to be modified and it cannot be accessed as its own resource; or when the equivalent of a method call must be exposed
* What is Representation?
-The data transmitted to and from the resource is a Representation of Resource.A representation consists of data, metadata describing the data, and, on occasion, metadata to describe the metadata
* What is connector?
-REST is having various connector like Client,Server,Cache,Resolver and tunnel.These connectors present an abstract interface for component communication, enhancing simplicity by providing a clean separation of concerns and hiding the underlying implementation of resources and communication mechanisms.All REST interactions are stateless. That is, each request contains all of the information necessary for a connector to understand the request, independent of any requests that may have preceded it.
* What is component?
This architecture is having following Web Constraints:
-Client Server
-Stateless
-Cache
-Uniform Interface
-Layered Systems
-Code on Demand
I will continue with rest of the detail along with some code-piece in my next write-up.
Representational State Transfer(REST) is architectural style for distributed hypermedia systems .
This complete architecture use few elements like Resource,URI,Verb,Representation,Component and Connector etc.
Let me explain each term with detail:
* what is Resource?
-The key abstraction of information in REST is a resource.A resource can be any meaningful functional object which can be addressed and can act upon a request
* What is URI?
- The address using which resource is being addressed is URI(uniform resource identifier ).It's having it's own structure to represent any object.It's composed of five parts called scheme, host, path, query, and fragment e.g. http://xyz.com/Resource/pageno=10#bookmark
If it is internal than you can refer
"/WebProject/resources/getcontent?page=HomePage§ion=2"
* What is Verb?
-In REST all operation performed using following verbs:GET, PUT, POST, and DELETE
The GET verb is used to read a resource.The PUT and DELETE verbs allow a request to alter the state of a resource atomically.POST create a new entry in the collection.The POST operation is very generic and no specific meaning can be attached to it. In general, use POST when only a subset of a resource needs to be modified and it cannot be accessed as its own resource; or when the equivalent of a method call must be exposed
* What is Representation?
-The data transmitted to and from the resource is a Representation of Resource.A representation consists of data, metadata describing the data, and, on occasion, metadata to describe the metadata
* What is connector?
-REST is having various connector like Client,Server,Cache,Resolver and tunnel.These connectors present an abstract interface for component communication, enhancing simplicity by providing a clean separation of concerns and hiding the underlying implementation of resources and communication mechanisms.All REST interactions are stateless. That is, each request contains all of the information necessary for a connector to understand the request, independent of any requests that may have preceded it.
* What is component?
-There are four components in REST: Origin Server,Proxy,gateway,useragent.An origin server uses a server connector to govern the namespace for a requested resource. A gateway component is an intermediary imposed by the network to provide an interface encapsulation of other services, for data translation, performance enhancement, or security enforcement.A user agent uses a client connector to initiate a request and becomes the ultimate recipient of the response.
-Client Server
-Stateless
-Cache
-Uniform Interface
-Layered Systems
-Code on Demand
I will continue with rest of the detail along with some code-piece in my next write-up.
Comments
Post a Comment
Please post your comments