[rest-practices] Atom as a generic container? [was Re: Media types]

Bill Burke bburke at redhat.com
Tue Apr 20 15:19:40 UTC 2010



Mark McLoughlin wrote:
>> Atom-style links are nice for references to URL's that are not some sort
>> of object in the system,
> 
> What are they, then? By giving them a URI, we're modelling actions as
> objects too :-)
> 
>> but they're not a particularly nice way to handle object references.
> 
> Bill makes the case for Atom links in his book and I agree it makes some
> sense. But I actually don't particularly care - we're designing a new
> API and trying to stick with the 'consensus approach' rather than going
> and re-inventing the wheel.
> 

To me, it just feels wrong to have to do a diff on a posted 
representation to figure out what exact complex logic that has to be 
triggered.  What I'm starting to do lately is always ask the question, 
how would I model something in a browser-based application?  For 
shutdown of a VM, would I really have one monster html form that 
contained all the mutable bits of state of the VM and submit it all with 
one post?  No.  I'd break things up into smaller HTML forums embedded in 
a bigger HTML document.

BTW, I'm not sure what you mean by 'consensus approach'.  IMO, REST + 
Web Services (or in other words non-browser-based REST) is a fairly new 
area.  I guess what I'm saying is that because things are still 
relatively new, different things should be tried to improve an API 
rather than worrying about a 'consensus approach'.


-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com




More information about the rest-practices mailing list