What is REST & what I understand by it??
Here is how Dr. Roy Fielding defines it:
“Representational State Transfer is intended to evoke an image of how a well-designed Web application behaves: a network of web pages (a virtual state-machine), where the user progresses through an application by selecting links (state transitions), resulting in the next page (representing the next state of the application) being transferred to the user and rendered for their use.”
The term was first given to describe a form of web architecture. So in short, REST is a model for building a distributed system.
Webservices & REST
Early webservices were the same as well. It was signified by the lack of integration among the services & difficulties in embedding services from various other sources.
This is where the role of REST comes into picture. REST, in fact is only a architecture. It doesn't bog you down with what underlying technologies to use, but helps you build distributed web applications & services. This way, RESTful webservice came to be known as second generation webservices.
Designing a RESTful webservice involves:
- Become free of underlying programming semantics. Expose the business implementation as a service. So the consumer will identify the service with a URI, which becomes a representation.
- This enables the representation to be callable over the HTTP interface.
- Each representation should have URL links to other representations.
- The URIs should not show any actions, should be shown like a verb/noun.
Eg. http://www.abc.com/AddItem
And not like,
http://www.abc.com/showPage?Process=Add
- XML is the format to work on, so design proper schema for representations.
No comments:
Post a Comment