Self-descriptive messages

Clients should express their preferred state through a host of request messages. A resource's current state gets communicated by the server to any client through a response message. For example, a wiki page editor can send a message to the server requesting to transfer a representation. The representation change may suggest a page update, which is the new state for the server-hosted and -managed web page. However, the server takes the call to accept or deny the client's request. As indicated in the previous paragraph, the self-descriptive messages may include metadata to carry and convey the additional details regarding the resource state, the representation format and size, and the message itself:

The core operations (GET, PUT, DELETE, and POST) performed on the current state of the resource are pictorially indicated in the following diagram. The state gets modified and updated by those operations. The diagram also indicates that the resource is delimited from its external environment, which interacts with it. That is, multiple parties can interact with the resource without any problem:

The resource is initiated with a state, which is in the middle of the previous diagram. The state is managed in any way that makes sense. Writing or reading from a database or file is one thing, but without any backend database, the business logic can't do any dynamic computation. The result is sent back to the requesting client. The previously mentioned core operations define its uniform interface. 

Establishing and providing a REST API isn't an easy thing to do. An application, as per the REST paradigm, comprises multiple and distributed resources that provide useful capabilities to the application's consumers. API developers have to understand the problem domain, analyze the business, technology, and user requirements, and accordingly have to design the various participating and contributing resources. The resource selection finally leads to the formation of the APIs, which need to be found and used for business automation. The following diagram illustrates how we define a REST API as a set of hyperlinked resources. The resources are being exposed by a web service, websites, and microservices:

We are heading toward the software-defined world, and every tangible thing gets enabled through appropriate APIs. Thus, the much-touted API economy is beginning to shine. Corporations are keen to embrace this strategically sound transition. APIs have become the interesting and inspiring component for our business and IT systems: 

Precisely speaking, the ROA facilitated by the REST paradigm is being pronounced as the major contributor for enacting the envisioned digital transformation, not only for business enterprises, government organizations, and IT companies, but also for humanity. With technologies permeating everyday life, people are going to be the smartest in decision making and in deeds. SOAP is the first industry-wide approach for the goal of service-enablement. Due to various complexity factors, REST is gaining market and mind shares, as illustrated in the following section.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.14.144.216