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

17949Re: [rest-discuss] Using URI templates in XHTML

Expand Messages
  • Eric J. Bowman
    Nov 9, 2011
      Mike Kelly wrote:
      > >
      > > No, it is not adequate.  The definition of rel='circle' still
      > > doesn't tell me what the range of allowable values is for the
      > > application domain, or what units are used.
      > Yes, it's an incomplete example. The definition could be extended to
      > include that information, right?

      No, not if we're talking about REST's uniform interface. A generic
      description of rel='circle' could conceivably require a positive
      integer, but individual application domains must still have a mechanism
      to delimit the value, i.e. declare a range of 4 - 50. Declaring that
      range in the definition of the link relation limits the re-use of that
      link relation in other application domains, since it's application-
      specific. Such application specifics belong in hypertext, not link-
      relation definitions (which should strive to be generic).

      > > An XForms slider control can delimit
      > > the allowable values and declare them to be pixels, resulting in a
      > > self-documenting API instead of an endpoint dependent upon
      > > out-of-band knowledge.
      > This would be a self-documenting API to you, but not to the automated
      > (m2m) client you build against it.

      It would be a self-documenting API for any user-agent which understands
      the slider form control, I fail to see what bearing the nature of the
      user (machine or human) has on it.

      > An automated client is dependent on the knowledge you instill it with
      > up front which, from its point of view when interacting with the
      > application, is out-of-band.

      You lost me there. REST is the antithesis of hard-coding such
      information into the client code. If the range of 4 - 50 is baked into
      the client code, the client can't adapt if the service modifies the
      allowable range. If, however, this range is presented in a hypertext
      control, updating the service range from 4 - 50 to 4 - 25 won't break
      existing clients because this knowledge is presented in-band.

      > I'm not clear on what you mean by 'endpoint' here, either.

      Instead of the hypertext providing the user-agent with instructions as
      to the allowable state transitions (links), your example provides an
      endpoint where undefined values derived through out-of-band knowledge
      may be used to expand {radius}. That's quite different from using
      hypertext to drive application state, so I'm calling it an endpoint.

    • Show all 19 messages in this topic