Loading ...
Sorry, an error occurred while loading the content.

Re: [rest-discuss] typical message protocols and more

Expand Messages
  • S. Mike Dierken
    ... The content returned depends on what the request expects and has asked for. For example, if you run across a document with an tag, the
    Message 1 of 12 , Nov 1, 2004
    • 0 Attachment
      >
      > Now for HTTP GET and POST response messages. I've asked a server to do
      > something and it's going to send data back to me. What are the most common
      > kinds of content I'll see returned? I'm guessing it is HTML and XML.
      > Correct?
      The content returned depends on what the request expects and has asked for.
      For example, if you run across a document with an <img src="..."> tag, the
      client application would expect to be able to transfer an image to or from
      the specified resource.
      The HTTP GET request has an Accept header that specifies a list of desired
      content-types - so your app might reasonable ask for PNG or JPG or GIF when
      retrieving an image.
    • S. Mike Dierken
      ... Yes. ... Yes. ... When transferring state to the server (POST, PUT) data is often sent as name/value pairs (encoded per the application/x-www-urlencoded
      Message 2 of 12 , Nov 1, 2004
      • 0 Attachment
        > REST applications typically use
        > * HTTP as the application protocol
        Yes.
        > * URLs as resource identifiers
        Yes.

        > * HTML form POSTs or XML as the request message protocol
        When transferring state to the server (POST, PUT) data is often sent as
        name/value pairs (encoded per the application/x-www-urlencoded definition).
        There are also file uploads where the server accepts multipart/form-data -
        each part has a content type associated. Of course, it's quite common to
        just directly POST or PUT the binary content of the data being transferred.

        > * HTML or XML as the response message protocol
        Perhaps in sheer numbers of resources, HTML, CSS, GIF, JavaScript, etc. are
        fairly popular content-types when retrieving representations of resources.
        RSS/Atom is getting more popular, but that could just be due to poor
        caching... (that's sort of a joke...)
      • R. Mark Volkmann
        I wrote an article on REST that includes details on a Java implementation. It focuses primarily on using REST to build distributed applications that are not
        Message 3 of 12 , Nov 5, 2004
        • 0 Attachment
          I wrote an article on REST that includes details on a Java implementation. It
          focuses primarily on using REST to build distributed applications that are not
          necessarily web apps. I'd be interested in any feedback on it. You can find
          it at http://www.ociweb.com/jnb/jnbNov2004.html.
        • Vincent D Murphy
          ... http://del.icio.us/url/be4c1b5c9756692d7d5fdbd47c10b28f
          Message 4 of 12 , Nov 5, 2004
          • 0 Attachment
            R. Mark Volkmann wrote:
            > I wrote an article on REST that includes details on a Java implementation. It
            > focuses primarily on using REST to build distributed applications that are not
            > necessarily web apps. I'd be interested in any feedback on it. You can find
            > it at http://www.ociweb.com/jnb/jnbNov2004.html.

            http://del.icio.us/url/be4c1b5c9756692d7d5fdbd47c10b28f
          • S. Mike Dierken
            The more articles explaining REST the better! Thanks for taking the time to do this. Overview - The main ideas behind REST are [...] The Overview only
            Message 5 of 12 , Nov 5, 2004
            • 0 Attachment
              The more articles explaining REST the better! Thanks for taking the time to
              do this.

              "Overview - The main ideas behind REST are [...]"
              The Overview only mentions retrieval of representations.

              "REST Characteristics - Clients "pull" resource representations from
              server."
              There is more to state transfer than retrieval. Clients can 'push' content
              to any reachable endpoint.

              "No server-side state is used to process the request."
              I know what you mean, but this might be a bit confusing for a newcomer.

              "Responses can be labeled as "cacheable" so clients know if it is safe to
              cache responses for performance reasons. "
              Excellent. I always forget to mention this.

              "PUT - creates a new resource or modifies an existing resource and typically
              returns the resource URL"
              I'm not sure the resouce URI is actually returned, since PUT requires the
              URI in the incoming request. POST sometimes returns the ID of a newly
              created resource.

              The CRUD discussion is a little unclear. PUT is used to set the state of an
              identified resource regardless of whether it existed before - sort of like
              an UPSERT in the SQL world. And POST is used for both create and update
              operations, but the distinction isn't visible in the HTTP. A little more
              discussion & comparison/contrast in this area may help some of the audience.


              I like the idea of providing a set of Java classes for application
              developers - that's an under-served audience in this area.
              If you are extremely bored, you might want to look at
              http://xml.apache.org/projects/xang/ for an older Java servlet-based
              framework for REST based applications (you have to get past some of the
              blather and look at the code, I really should dust off that code and
              simplify the docs...). But really, for this stuff, once a developer
              understands the ideas, the 'framework' is only a very small amount of code.

              Also, for a good Java HTTP client library, take a look at Apache's Commons
              project http://jakarta.apache.org/commons/httpclient/.

              "REST is not appropriate for stateful applications"
              You should also mention that stateful applications are not appropriate for
              the Web (or scalability, etc.).

              "REST isn't currently preferred over SOAP by major players"
              Hmm, I work at a little bookstore in Seattle & we use REST style software
              all the time.
              Perhaps you meant by major vendors?



              ----- Original Message -----
              From: "R. Mark Volkmann" <mark@...>
              To: "Rest List" <rest-discuss@yahoogroups.com>
              Sent: Friday, November 05, 2004 5:19 AM
              Subject: [rest-discuss] new REST article


              >
              > I wrote an article on REST that includes details on a Java implementation.
              It
              > focuses primarily on using REST to build distributed applications that are
              not
              > necessarily web apps. I'd be interested in any feedback on it. You can
              find
              > it at http://www.ociweb.com/jnb/jnbNov2004.html.
              >
              >
              >
              >
              > Yahoo! Groups Links
              >
              >
              >
              >
              >
              >
              >
              >
            • R. Mark Volkmann
              Thanks for taking the time to review my article! I ll try to incorporate your feedback this weekend. ... From: S. Mike Dierken To:
              Message 6 of 12 , Nov 6, 2004
              • 0 Attachment
                Thanks for taking the time to review my article!
                I'll try to incorporate your feedback this weekend.

                ----- Original Message -----
                From: "S. Mike Dierken" <mdierken@...>
                To: "Rest List" <rest-discuss@yahoogroups.com>; "R. Mark Volkmann"
                <mark@...>
                Sent: Saturday, November 06, 2004 12:01 AM
                Subject: Re: [rest-discuss] new REST article


                >
                > The more articles explaining REST the better! Thanks for taking the time
                > to
                > do this.
                >
                > "Overview - The main ideas behind REST are [...]"
                > The Overview only mentions retrieval of representations.
                >
                > "REST Characteristics - Clients "pull" resource representations from
                > server."
                > There is more to state transfer than retrieval. Clients can 'push' content
                > to any reachable endpoint.
                >
                > "No server-side state is used to process the request."
                > I know what you mean, but this might be a bit confusing for a newcomer.
                >
                > "Responses can be labeled as "cacheable" so clients know if it is safe to
                > cache responses for performance reasons. "
                > Excellent. I always forget to mention this.
                >
                > "PUT - creates a new resource or modifies an existing resource and
                > typically
                > returns the resource URL"
                > I'm not sure the resouce URI is actually returned, since PUT requires the
                > URI in the incoming request. POST sometimes returns the ID of a newly
                > created resource.
                >
                > The CRUD discussion is a little unclear. PUT is used to set the state of
                > an
                > identified resource regardless of whether it existed before - sort of like
                > an UPSERT in the SQL world. And POST is used for both create and update
                > operations, but the distinction isn't visible in the HTTP. A little more
                > discussion & comparison/contrast in this area may help some of the
                > audience.
                >
                >
                > I like the idea of providing a set of Java classes for application
                > developers - that's an under-served audience in this area.
                > If you are extremely bored, you might want to look at
                > http://xml.apache.org/projects/xang/ for an older Java servlet-based
                > framework for REST based applications (you have to get past some of the
                > blather and look at the code, I really should dust off that code and
                > simplify the docs...). But really, for this stuff, once a developer
                > understands the ideas, the 'framework' is only a very small amount of
                > code.
                >
                > Also, for a good Java HTTP client library, take a look at Apache's Commons
                > project http://jakarta.apache.org/commons/httpclient/.
                >
                > "REST is not appropriate for stateful applications"
                > You should also mention that stateful applications are not appropriate for
                > the Web (or scalability, etc.).
                >
                > "REST isn't currently preferred over SOAP by major players"
                > Hmm, I work at a little bookstore in Seattle & we use REST style software
                > all the time.
                > Perhaps you meant by major vendors?
                >
                >
                >
                > ----- Original Message -----
                > From: "R. Mark Volkmann" <mark@...>
                > To: "Rest List" <rest-discuss@yahoogroups.com>
                > Sent: Friday, November 05, 2004 5:19 AM
                > Subject: [rest-discuss] new REST article
                >
                >
                >>
                >> I wrote an article on REST that includes details on a Java
                >> implementation.
                > It
                >> focuses primarily on using REST to build distributed applications that
                >> are
                > not
                >> necessarily web apps. I'd be interested in any feedback on it. You can
                > find
                >> it at http://www.ociweb.com/jnb/jnbNov2004.html.
                >>
                >>
                >>
                >>
                >> Yahoo! Groups Links
                >>
                >>
                >>
                >>
                >>
                >>
                >>
                >>
                >
                >
                >
                >
                > Yahoo! Groups Links
                >
                >
                >
                >
                >
                >
                >
                >
              Your message has been successfully submitted and would be delivered to recipients shortly.