Apologies for the delayed response.
I like Asger's pushback on all of these points. The last item,
exposing properties as resources, is the only one that I feel firmly
about. In light of Chris' last email about finalizing the REST API,
these comments are not so urgent. If the proposed API will be exposed
alongside the existing one for now rather than replacing it, then I
prefer to learn by experimentation rather than debating the topic in
the abstract.
Note: If you do add the proposed API as an additional set of
endpoints, be sure to offer an installer option of turning it off for
the sake of security. It's been enough of a headache getting FeSL to
cover one REST api. Who knows how long it would be before it covers a
second one!
On Oct 30, 2009, at 7:16 AM, Asger Askov Blekinge wrote:
I fail to see how POST /objects/{pid}/properties/state (content A)is
more difficult to consume than POST /objects/{pid}?State=A
The distinction is only blurry for the simplest cases.
POST /objects/{pid}/properties/state
is not very different from
POST /objects/{pid}?State=A
but when you look at it in terms of round-tripping information about a
resource as a whole
GET /objects/{pid}/properties/state
GET /objects/{pid}/properties/label
GET /objects/{pid}/properties/ownerId
{ ... change stuff ...}
POST /objects/{pid}/properties/state
POST /objects/{pid}/properties/label
POST /objects/{pid}/properties/ownerId
is very different from
GET /objects/{pid}
{ ... change stuff ...}
POST /objects/{pid}?state=A&label=New%30Label&ownerId=myUserId
So the design decision in some ways depends on what kind of operations
you're trying to support. I think the latter (the current API design)
hones closer to the web pattern and will bear greater flexibility &
maintainability for the long term. Having said that, I would be happy
to try out an alternative and potentially come to love that approach.
If the proposed alternative API simply adds the option of the fine-
grained urls while allowing others to continue interacting with the
whole resource at once, then I'll be happy to see it and will be
curious to hear people's observations 6 months down the road.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Fedora-commons-developers mailing list
Fedora-commons-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fedora-commons-developers