REST Questions

Dave Winer dave@userland.com
Sat, 25 Aug 2001 21:54:03 -0700


Paul, I have no idea what we're talking about, I just don't understand what
you're pushing back against. I love URLs. They're great for HTTP requests in
browsers and in scripts. I'm so confused by the "debate" that's happening
here and on other mail lists. The purpose of the last message was to tell
you what I care about not to say that anything you want to do is wrong. Dave


----- Original Message -----
From: "Paul Prescod" <paulp@ActiveState.com>
To: "Dave Winer" <dave@userland.com>
Cc: <FoRK@xent.com>
Sent: Saturday, August 25, 2001 7:54 PM
Subject: Re: REST Questions


> Dave Winer wrote:
> >
> > OK -- popping up a level, the only reason I care about SOAP and XML-RPC
is
> > so that I can write scripts that connect with other scripts running on
other
> > machines in other languages on other operating systems. For me it's all
> > about cross-network scripting, nothing more or less. Dave
>
> So if you have the option of exposing resources in a manner that is
> accessible to the full Web infrastructure you choose not to do
> it...Exposing data through URLs with parameters is something every PHP,
> Perl, Cold Fusion or Zope programmer knows how to do.
>
> I'm an XML advocate, so I'm strongly of the belief that people should
> expose the data and let the end-user get as easy access to it as
> possible. You have no idea how important your data might be to someone
> else if you just give them easy structured access to it. Nobody
> predicted Yahoo or the Google or Meerkat when they started generating
> HTML or RSS. The massively useful indexes just arose from the existence
> of a large body of addressable data.
>
> The example of looping over the mailboxes is not very representative of
> the sorts of things you can do with existing XML-RPC or SOAP libraries,
> so let's put it aside. I don't think XML-RPC can do this without a
> task-specific client library and I don't have a fully elaborated
> URL-centric solution either:
>
> local (msg)
> for msg in @["Bull Mancuso"].inbox.messages
>     if msg.subject contains "REST"
>       msg.forwardTo (clay@shirky.com)
>
> So let's put it aside and deal with the venerable getStateName example.
> How is the method-based version better than putting a script behind a
> URL using PHP or FrontierScript or whatever? I'm thinking of something
> like
> GET http://www.userland.com/StateName/41
>
>   returns just
>
> ohio
>
> or maybe
>
> <string>ohio</string>
>
> or even
>
> <?xml version="1.0"?>
> <methodResponse>
>    <params>
>       <param>
>          <value><string>South Dakota</string></value>
>          </param>
>       </params>
> </methodResponse>
>
> It is easy to combine the virtues of today's web and XML-RPC. Now I can
> use your stateName service from ANY browser, from XSLT, from a simple
> macro language, etc. It can also be cached, indexed, etc.
>
> What's the downside?
> --
> Take a recipe. Leave a recipe.
> Python Cookbook!  http://www.ActiveState.com/pythoncookbook