locked
What do the words that define REST mean RRS feed

  • Question

  • User-1849651236 posted

    Hello,

    I understand that REST is defined as "REpresentational State Transfer" and I know what "Transfer" means and I think I know why the term "State" is used, but why do they use the term "REpresentational" to describe REST?

    I'm trying to understand REST and I thought it would help to know that.

    Any help would be gratefully appreciated.

    Thanks,
    Tony

    Thursday, November 3, 2016 7:45 PM

Answers

  • User753101303 posted

    Only the author might tell and sometimes you choose a word just to come up with a cool acronym ;-). I'm not sure a single word really matters for understanding what REST really means.

    Ah, I gave a look at the paper and noticed that this is a dissertation for a "doctor of philosophy in computer sciences" degree (I respect that but it likely favor concepts over their practical usage).  Also I've done a quick text search and found at http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm#sec_5_2  a "5.2.1.2 Representations" chapter :

    "REST components perform actions on a resource by using a representation to capture the current or intended state of that resource and transferring that representation between components. A representation is a sequence of bytes, plus representation metadata to describe those bytes. Other commonly used but less precise names for a representation include: document, file, and HTTP message entity, instance, or variant."

    As I alluded earlier a computer could be considered as an incredibly versatile representations handling machine.

    To get back at my first response if you take REST as "using the simplest HTTP calls you can"  to transfer data back and forth (by opposition to having to create an additional  specification such as http://www.w3.org/TR/soap12/ to define which payload should be send over http) then IµMHO you likely understood 80 or 90% of what you need to understand about REST web services in practice...

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, November 4, 2016 11:47 PM

All replies

  • User753101303 posted

    Hi,

    The long story you may have seen already is that this is an architectural style that follows several constraints: https://en.wikipedia.org/wiki/Representational_state_transfer#Architectural_constraints (you even have a link to the original paper if you really want ;-)

    In practice and applied to web services it is used basically as a shortcut for "exposing your service using basic http requests" (ie knowing how to create a basic http request is all you need to call the service).

    This is opposed to other style of services where instead you post an XML payload that have to follow separate specifications (such as https://en.wikipedia.org/wiki/SOAP  or https://en.wikipedia.org/wiki/XML-RPC based services).

    Thursday, November 3, 2016 8:50 PM
  • User-1849651236 posted

    Patrice,

    Thanks for your help, but I don't see how what you presented to me answers my question.

    Thanks,
    Tony

    Thursday, November 3, 2016 9:03 PM
  • User753101303 posted

    To me the core meaning for "representational" is "not being the real thing but being close enough to be considered as the real thing without even thinking about it" which seems to apply both to "exposing" data from one computer to another and using basic http concepts to "express" such a transfer.

    Never really wondered before. Not an English speaker but we have the same word with (likely ?) the same meaning at its core. If you think about it a computer is just a huge representational machine.

    Friday, November 4, 2016 8:15 AM
  • User-1350042179 posted

    It means "Representational state transfer"...

    Friday, November 4, 2016 7:16 PM
  • User-1849651236 posted

    Patrice,

    Thanks for your reply.

    If I use a dictionary to define "represent", It says "entitled or appointed to act or speak for (someone)".  So, I understand what it means when one thing represents another.

    In the context of "REST", I am unsure of what is representing what.  Is the web service representing a source of data like a database?  Is "representational" an adjective of "state"? Meaning that the "state" of the "transfer is represented by something?

    I am still puzzled as to why the word "representational" is used to describe a transfer of data over a network.

    Thanks,
    Tony

    Friday, November 4, 2016 7:54 PM
  • User753101303 posted

    Only the author might tell and sometimes you choose a word just to come up with a cool acronym ;-). I'm not sure a single word really matters for understanding what REST really means.

    Ah, I gave a look at the paper and noticed that this is a dissertation for a "doctor of philosophy in computer sciences" degree (I respect that but it likely favor concepts over their practical usage).  Also I've done a quick text search and found at http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm#sec_5_2  a "5.2.1.2 Representations" chapter :

    "REST components perform actions on a resource by using a representation to capture the current or intended state of that resource and transferring that representation between components. A representation is a sequence of bytes, plus representation metadata to describe those bytes. Other commonly used but less precise names for a representation include: document, file, and HTTP message entity, instance, or variant."

    As I alluded earlier a computer could be considered as an incredibly versatile representations handling machine.

    To get back at my first response if you take REST as "using the simplest HTTP calls you can"  to transfer data back and forth (by opposition to having to create an additional  specification such as http://www.w3.org/TR/soap12/ to define which payload should be send over http) then IµMHO you likely understood 80 or 90% of what you need to understand about REST web services in practice...

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, November 4, 2016 11:47 PM