What does the State Transfer in Representational State Transfer refer to?
Found some explanations about this (e.g. here) but I still don't understand. For example in the article it is said
The representation places the client application in a state.
Why? What does state (as I understand it, something like a session) have to do with a representation of a resource?
Why? What does state (as I understand it, something like a session) have to do with a representation of a resource?
An object has attributes (or state) and behaviors (or methods).
If I want to move an object from my desktop to a server I have to do the following:
Create a representation of the state of the object.
Transfer that representation from the desktop to the server.
The methods I don't transfer. I install the same class definition on both machines.
So, REST is about creating a representation of the object's current state so it can be transferred to another server from which the object can be reconstructed.
We only send the state -- the attributes -- of the object. And we have to create an external, serialized representation of that state.
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