[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: REST has too many verbs
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 allowed. 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|