NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Et tu, Brutus? (Score:1)
I thought you of all people understood REST. :-(
That’s not theory. That’s the web. Also, have you heard of something called AtomPub [ietf.org]? That’s like that, too. There are a lot of de
Re: (Score:2)
I thought you of all people understood REST.
To be honest, I'd totally missed this part of it. I understand why Roy thinks it's important, but I'm not sure that I think it's important.
My goals for doing something REST-like are several fold ...
First, share the same URI space between what a browser sees and what a non-browser would see. This works quite well for everything that should be POST, PUT, and DELETE. For GETs, you end up with a bunch of stuff like
/person/1/edit_formbecause browsers kind of suck, but that's ok.Second, by sharing that URI spac
Re:Et tu, Brutus? (Score:1)
Sure, that’s fine. Really, you don’t necessarily have to provide a specific media type; the core issue is that you document the response format, and that that format use links rather than application-specific IDs that the client must slot into URI templates which are never part of the in-band communication, and generally have to be built into the client at programming time.
The other thing is, hopefully you would mostly use well-known, extensible media types (eg. Atom) as the base content type for most of what you serve, so that clients actually don’t need to reimplement this parse-and-follow-links bit over and over. (Using a documented subset of XHTML works well when the structure of AtomPub does not quite match your needs: it’s XML and therefore easily parsed, but it’s also browser-navigable at the same time – very nice.)
It looks that way from the point of view of any one service, yes. You have to take a larger view to see that the point is not to have to write clients entirely from scratch for every single service, which ultimately benefits all of the individual services as well. (Imagine what would happen to the web if you had to use different browsers for different sites, or even just for different kinds of sites. Yet that is how we build programmatic agents today. AtomPub is the only large-scale exception I know of so far.)
And then the question becomes, does it really need them? Most web services reinvent wheels in areas where that is not at all necessary.
Yes. This criticism has been levelled against the book by many of the people in the REST circle. Sam’s response has always been along the lines of progressive disclosure [intertwingly.net] – which I kind of agree with, however I still think they needed to expound on this aspect at more length. It is really the cornerstone of REST – all of the other parts are in a sense groundwork laid down to enable hypermedia, which is the actual end goal, since that is how you achieve real decoupling.
Reply to This
Parent