It is not always easy to figure out what is really a RESTful application and/or api, because there is a sort of misunderstanding about the REpresentational State Transfer architectural style meaning and scopes.
Initially, I was quite in trouble with what, the adjective "REpresentational" of the acronym REST, referred to. This was because "representational state" sounded to me not so well...
Further, I was impressed also by a blog post of the author of this architectural style, Roy Fielding, where he is a lot disappointed about the frequent misunderstanding that api based on http verbs are RESTful, in particular he complaints about the coupling among client and server of these api regarding their names and data structures.
I want to try to give only a theoric explanation about REST arch. style and I'd like to know other points of view.
Definition of misunderstanding 1 : a failure to understand : misinterpretation The instructions were carefully written to prevent misunderstanding. 2 : quarrel, disagreement an unfortunate misunderstanding between two old friends. Synonyms More Example Sentences Learn More About misunderstanding.
use word parts (roots, prefixes, and suffixes) to determine the meaning of an unfamiliar word. use context clues to confirm the meaning of an unfamiliar word. use a graphic organizer to achieve a deeper understanding of specific vocabulary words.
Technical definition mostly refers to the aspect of explaining or describing any technical terms or terminologies. Examples include the terms and definitions of the words found in dictionary.
Misunderstood is the past tense and past participle of misunderstand. 2. adjective. If you describe someone or something as misunderstood, you mean that people do not understand them and have a wrong impression or idea of them.
First part
My main goal is to focus attention on the reason for the name "representational state transfer".
I think that the most of misundertandings about the REST goes under the adjective "representational". Most people think that "representational" word relates to the resource state and so builds application focusing on object structures to communicate/transfer to the calling clients.. but I think that the focus is the "transfer", it is the transfer to be"representational", and so it is important design applications (or api) that make use of the "representational" ability of the REST network system on that they rely, to support transfers among client-server components.
To figure out the whole question about the concern of the REST architectural style, it needs to understand that the author, Roy Fielding, intended to suggest in his dissertation, a set of architectural principles to build architectures based on the hipertext or hipermedia paradigm, and so this paradigm is the central key to understand this important topic.
Behind the style of organizing a client-server application's architecture proposed by Roy Fielding, I think there is a specific idea of a modern client-server application, that consists by a sort of engine to govern application state transition, whose states are potentially extensible to infinite.
In this vision, the Ipertext\Ipermedia is the center of the whole architectural style proposed by Fielding and the key concept that allows this paradigm to work is the "representational (state) transfer".
So we can understand why the word "representational" refers to the concept about the "transfer", instead of the concept about "state". Because it is the transfer to be representational (of a representational type), and this means that it is the system that manages the "transfers" and on which relies the client-server interaction, to give some standard indication about the representation, that is the media-type concept (or MIME in the web implementation of the REST) and that is, in my opinion, the main cause of the name "Representational State Transfer".
So, designing a Restfull application, it is design first an architecture based on a web of components, each of them comunicates with others in a client-server layered architecture model, sending each of them a representation of its state.
And so, the front-end, the first client of this architecture, transits through its states showing rapresentation of the states sended by the component, or components, that it calls endorsing on a uniform consistent interface and not on a "private" api.
A such type of application, in the mind of the author, is potentially extensible to infinite states, because its states don't depend on a private api, but depend on a univoque identifier system (as URI) shared by all agents in this architecture, on a few some verbs to manage transion of its states and on an agreed shared representational transfer system, or plus.
This transition ends with communication of its representation to the called server component via the verbs that compose the "public" api, which should belong to the stateless communication protocol used by the client-server components.
In such a way, this client-server components interaction consists in interchanging (transferring, communicating) of standardized representations (media types) of components states, based on use of a stateless protocol.
And the core concept that allows all these architectures to potentially extend itself to infinite is the decoupling of component's resources structures and names with their client identifying and representation (representational transfer).
Second part
further details on mediatype and RESTful application building
I think that the original intuition of Fielding was been the idea that a key feature to allow full decoupling between client and server components in a distributed application architecture, and indefinitely extensible, was the definition of an open and evolving standard representations set, and thus the ability of these components to exchange such representations and in the case of the client to interpret them.
That's why "representational transfer"!
Namely, transfers based on standardized rappresentations. Instead, "state" is precisely what is represented in the standard way because it is understood by any client component that supports REST principles, and allows the representation itself to be the engine of the state transitions containing in its mediatype representation also the standard information handling, which them should refer to a small set of standard verbs related to the client-server communication protocol.
Therefore, to build applications (or connectors from the point of view of REST) adhering to the standard REST and therefore RESTful, means:
designing uri for own resources;
making these uri always available into representations sended to the clients;
focusing in design the most appropriate media type representations to support own application flow, and so the same state transitions.
This means to support any type of media on any type of device and also support any type of interaction system or transition states (eg automated systems not only user)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With