A web service is a client as well as a server application which is used to communicate over the World Wide Web's (WWW) Hypertext Transfer Protocol (HTTP). According to the World Wide Web Consortium (W3C), the web services offer a regular way for interoperation between software applications that are running on various types of platforms as well as frameworks.
The REST Architecture
REST is abbreviated as Representational State Transfer is a phrase coined by Mr. Roy Fielding in the year 2000. It is a structural design approach for crafting loosely attached applications using HTTP which is often implemented in the growth of web services. REST web services do not impose any rule concerning how it needs to be put into practice at a subordinate level; it just places high-level design guiding principle and absconds you to think of our implementation.
In this architecture, a REST server offers contacts to resources which also helps in client accesses as well as help in updating the resources. In this, the resources are recognized by URIs / global IDs. This API employs a variety of representations for signifying a resource like JSON - which is very popular among them all, text, XML formats. REST architecture oriented web services are termed as RESTful web services.
The REST architecture makes use of four commonly used HTTP methods. These are:
|GET||This method helps in offering read-only access for the resources.|
|POST||This method is implemented for creating a new resource.|
|DELETE||This method is implemented for removing a resource.|
|PUT||This method is implemented for updating an existing resource or creating a fresh one.|
These methods have been described in more detail in further chapters.