What does Representational State mean in REST?

前端 未结 8 751
执笔经年
执笔经年 2021-01-30 02:58

I have been reading all over the net to get the exact meaning of two words:

REPRESENTATIONAL STATE

I have a doubt. I am misunderstanding these terms. i want to

8条回答
  •  花落未央
    2021-01-30 03:48

    I think that the whole question about the concern of the REST architectural style, goes around to understanding, that the author, Roy Fielding, had in his mind to suggest in his dissertation, a set of architectural principles to build architectures based on the hipertext or hipermedia paradigm.

    This paradigm, I think, 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".

    I think that "representational" refers to the concept about the "transfer", instead of the concept about "state", that is, it is the transfer to be representational (of a representational type), and that is, in my opinion, the main cause of the name "Representational State Transfer".

    So, designing a Restful 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 components client-server.

    In a such way, this client-server components interaction consists in interchanging (transferring, communicating) representations of components states of using a stateless protocol.

    And the core concept that allows all these architectures to potentially extend itself to infinite is the representational transfer that endorse their architecture.

提交回复
热议问题