[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MUST a collection be returned as an Atom feed?





On Dec 28, 2009, at 6:44 PM, Joe Gregorio wrote:

On Mon, Dec 28, 2009 at 12:08 PM, Jan Algermissen
<algermissen1971@xxxxxxx> wrote:

On Dec 28, 2009, at 5:49 PM, Joe Gregorio wrote:


On Mon, Dec 28, 2009 at 11:32 AM, Jan Algermissen
<algermissen1971@xxxxxxx> wrote:



[...]


Rephrasing the question:

Whay is the sentence "Collections are represented as Atom Feeds" in RFC
5023?

Is it a MUST requirement for AtomPub servers?

Yes.

That is what I understood from the spec. Thanks.

What is your reaction to the following?

Given it is a MUST requirement, it can be said that clients can make the assumption to receive an Atom feed document as the response to a GET request
to an AtomPub collection resource. Yes?

No. An Atom representation MUST be present, but the client should still send an appropriate Accept header since there might be multiple representations
available. See http://tools.ietf.org/html/rfc5023#section-4.4

Agreed, that's what I meant. I am only talking about an Atom feed being available *at least*.



If so, that means the client can make assumptions about the next available links (state transitions) after receiving the response to the GET request. E.g. it knows there will be links to member resources in the feed. Yes?

Just like when I retrieve an HTML page I know that it might contain links to other resources, but that's as far as my 'knowing' goes. I don't 'know' what the actual URIs are, or even if they are going to be there, i.e. it
could be a feed with 0 entries.

Yes, agreed.

OTH, this is an incidental property of Atom feeds. **Suppose** Atom feeds had a mandatory link, would you

consider the feed format to be bad design   or

consider AtomPub bad design because it made returning that feed format mandatory?


Jan



  Thanks,
  -joe

If so, doesn't that violate RESTs hypermedia constraint because RFC 5023 enables the client to make design time assumptions about the state machine provided by the service? Shouldn't the client allways just discover the
available transitions instead of assuming them?

Jan

(Please excuse me if you think this is nit picking. I am not just trying to
be difficult)









(Or a SHOULD or a hint to client developers?)


Or, rephrasing again:

Could the sentence "Collections are represented as Atom Feeds" be removed
from RFC 5023 without consequences?

No it could not be removed, RFC 5023 is the Atom Publishing Protocol, it's
about
publishing using Atom Feed and Entry documents.

You could remove it and let the client try to guess the media-type
of the resources, or work with a range of media-types, such as JSON, HTML and Atom, which might be an interesting experiment, but it wouldn't be
AtomPub.

 Thanks,
 -joe



Why is it in there at all?



Jan

P.S. I am using that sentence as a stripped down example of a point I am trying to make. No intention to discuss/question RFC 5023 in particular.





Nikunj Mehta
http://blog.o-micron.com






--------------------------------------
Jan Algermissen

Mail: algermissen@xxxxxxx
Blog: http://algermissen.blogspot.com/
Home: http://www.jalgermissen.com
--------------------------------------






--------------------------------------
Jan Algermissen

Mail: algermissen@xxxxxxx
Blog: http://algermissen.blogspot.com/
Home: http://www.jalgermissen.com
--------------------------------------





--------------------------------------
Jan Algermissen

Mail: algermissen@xxxxxxx
Blog: http://algermissen.blogspot.com/
Home: http://www.jalgermissen.com
--------------------------------------