OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] REST has too many verbs

[ Lists Home | Date Index | Thread Index ]

Alaric Snell wrote:
> >
> > If you start having many of these interfaces, web service combination
> > becomes much more difficult. At the very least, if you want the benefits
> > of REST, every single interface should have a GET method.
> Yes and no. Each interface should, if possible, support a standard human
> interface method as well as domain-specified methods. 

Human interface is not what I'm talking about. The GET method is the
basis for all forms of addressing and hyperlinking which is really
useful in hypertext but is just as important in almost any other domain
of distributed processing.

> So the Security interface would have methods to add and remove access control
> list entries, 

You don't need that. You can use POST, PUT and DELETE on URIs.

> ... and a getUserInterface that just returns a URL to a standard
> public domain class that provides an editing interface to this.

Or you could just let generic browsers do it through POST, PUT and
DELETE (which they admittedly do not support today).

> For something like a document, the Document interface would be provided, 
> which has two methods:
> 1) getContent - returns your XML document or whatever, tagged with a MIME type
> 2) getUserInterface - returns a suggested viewer class for that document, but
> browsers are free to do their own selection based upon the MIME type and/or
> namespace decls in the XML or user overrides or whatever.

You don't need these. You can either use content negotiation or you can
have hyperlinks from the resource to its user interface representation.

You can't support REST as a "subset". REST imposes a small-methods
discipline that makes it possible to build components that talk to each
other without any a priori knowledge of each other besides URI (the
minimal bootstrap). It does this by minimizing the number of methods

Consider a Unix command line shell. How many "methods" are there for
connecting processes and files? ">", ">>" and "<". The power comes in
combining those connection methods with filters and transformers. Not
with inventing more and more methods. getUserInterface is just "GET
/userInterface" but the latter is much more powerful because it merges
the content and user interface namespaces into a single one instead of
two separate ones.

 Paul Prescod


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS