[rest-practices] Read-only fields in a representation type
Bryan Kearney
bkearney at redhat.com
Fri Apr 23 12:54:19 UTC 2010
On 04/23/2010 08:30 AM, Mark Little wrote:
> The debate as to whether or not to use WADL isn't tied to HATEOS, which
> as you know is only one aspect of REST: the reasons not to use it go
> much deeper than that. I assume you've checked out various resources
> like ...
Well.. that is the common refrain. If you are describing the URLs, you
_must_ not be using the links, and therefore you are too tightly coupled
to the server.
I find it interesting that the on ramp to rest is "it is simpler", which
it is when you go the bookmark approach, and send http requests to known
resource locations. If I was asked to write a client against
"ThatKoolRestAPI" then either:
1) The developers had better documented every resource, and every action
link which is possible from each link
or
2) I have to execute each path manually (or with loggin) to see what I
can do next.
Since I tend not to trust developers to always update the documentation,
it seems like an automated means to do (1) would be valuable to the API
writers as well as documenters. Note, I am not advocation IDL driven
development. Develop the code, generate the IDL.
>
> http://www.25hoursaday.com/weblog/2007/06/04/WhatsWrongWithWADL.aspx
> http://stackoverflow.com/questions/1312087/what-is-the-reason-for-using-wadl
>
> http://www.markbaker.ca/blog/2007/05/rest-wadl-forest-trees/comment-page-1/
> http://www.innoq.com/blog/st/2007/06/wadl_just_a_hypermedia_format.html
> http://www.tbray.org/ongoing/When/200x/2007/05/28/REST
> http://www.mnot.net/blog/2008/01/21/wadl_watching
> http://www.infoq.com/news/2007/03/WADL
Some of the these are against it, but much of the haters are in the
comments. The best valuable comments are from the fist link which talk
about the issues of using XSD as the means to validate. I think these
are valid. I would rather see the discussion be around how to make a
good descriptor syntax, but it seems to be focused on "why would you
ever want to describe your API?"
-- bk
More information about the rest-practices
mailing list