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

9717Re: URL-Design: Structured Resources vs. Searching Globally

Expand Messages
  • Patrick Mueller
    Nov 1, 2007
    • 0 Attachment
      Hugh Winkler wrote:
      > I admit I'm not sounding very convincing with this argument, because
      > I'm asking you a) to have clients make an extra GET first to retrieve
      > the form, and b) they still have to have some foreknowledge of the
      > element name attributes they should understand. It does however
      > insulate them from having to understand the form of your urls.
      >
      > I guess I'm putting this out here for discussion, and not really
      > suggesting you implement it this way. But if anyone out there thinks
      > there's a good way to do what I'm trying to do, which is to drive the
      > interaction through forms, please jump in.

      Yeah, not sounding terribly convincing to me. I do think your described
      solution is fine, as long as there really isn't a need for 'machine to
      machine' communication.

      Actually, let's discuss this 'machine to machine' communication. I
      think what you're actually talking about is 'all other forms of
      client-server interaction for this application other than an HTML page'.
      I mention this because I get this sense that people think 'machine to
      machine' communication is bad, when in fact, it's quite good. The more
      clients, the merrier.

      I think once you've decided that you'd like to open your 'server
      application' up to more than just the HTML pages you provide, you really
      do need to describe your REST APIs *somehow* (the urls, and the data
      flowing over the wire). We'll obviously never agree on *how*, I'm not
      going to go so far as to suggest that's possible. :-)

      Hugh's right that you can glean some of this information from a
      plain-old HTML form. Perhaps lightly enhanced via MicroFormats or some
      such, a form really could serve as a per-API meta-description of the API
      itself. Interesting idea.

      On the other hand, pretend that you've actually described your APIs
      (URLs and the data that flows through them) in some kind of
      program-readable fashion. From this, it would be easy to dynamically
      build a form, in JS on the client. Is there a difference?

      --
      Patrick Mueller
      http://muellerware.org
    • Show all 7 messages in this topic