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

Re: [rest-discuss] How to GET a for editing in RESTful design?

Expand Messages
  • Jan Algermissen
    Scott, IMO forms should either be discovered while the client proceeds through the application s state machine or the MIME type that supports the desired
    Message 1 of 59 , Aug 5, 2006
    • 0 Attachment
      Scott,

      IMO forms should either be discovered while the client proceeds
      through the application's state machine or the MIME type that
      supports the desired interactions should provide sufficient semantics
      so the client knows when to expect the forms (e.g. Atom Publishing
      Protocol's <accept> element)

      Keep in mind that a form is essentially information provided by the
      server to the client about the availability of a certain
      (parameterized) state transition within a given application.

      The MIME type should provide enough semantics to tell client
      implementors how to handle a form (and maybe when to expect one) and
      the server should then just provide the forms as needed to enable the
      application.

      HTH,

      Jan

      On Aug 5, 2006, at 6:58 PM, Scott Chapman wrote:

      > If hitting a URL with GET is supposed to give you a view of the
      > resource and
      > it's not a form by default, then how to do you get a <form...> view
      > of it for
      > editing?
      >
      > The same applies to getting a blank form for creating a new resource.
      >
      > How are people handling these situations in their RESTful designs?
      >
      > Scott
      >
      >
      >
    • Jan Algermissen
      Bill, Scott, yepp, APP solves all of these in a standardized way. IIRC there is actually already a standardized means to find the editing-resource of another
      Message 59 of 59 , Jan 4, 2007
      • 0 Attachment
        Bill, Scott,

        yepp, APP solves all of these in a standardized way.

        IIRC there is actually already a 'standardized' means to find the editing-resource of another resource by pure HTTP mechanisms: The Link header together with the 'source' relation. That is, if the server tells you about a related resource via a Link of type 'source' all editing should be applied to that one.

        I recall Roy having mentioned that on one of the Atom lists.

        Though I have no idea about the actual standardization status of either the Link header nor the source relation...

        Jan



        On 08.08.2006, at 18:11, Bill de hÓra wrote:

        Scott Chapman wrote:
        >
        >
        > If hitting a URL with GET is supposed to give you a view of the resource
        > and
        > it's not a form by default, then how to do you get a <form...> view of
        > it for
        > editing?
        >
        > The same applies to getting a blank form for creating a new resource.
        >
        > How are people handling these situations in their RESTful designs?

        The most common pattern today is to provide the form at another URL,
        which you typically embed as a link in the representation. Blog APIs do
        something similar by providing a URL you post into. Looking further out,
        atom protocol will standardize a means for getting at what it calls the
        "edit-uri" for a resource.

        It's a good question, illuminating even.

        cheers
        Bill


      Your message has been successfully submitted and would be delivered to recipients shortly.