[rest-practices] Media types

Bill Burke bburke at redhat.com
Thu Apr 15 13:12:42 UTC 2010



Bryan Kearney wrote:
> On 04/15/2010 08:53 AM, Eoghan Glynn wrote:
>>
>>
>>  > Is media type the preferred model for versioning rather than URL?
>>
>> Well I guess the answer might be influenced by the choice between a
>> single over-arching media type and many fine-grained types. Because if
>> the former, then specifying the version in the Content-Type would imply
>> the versions of all fine-grained types are rev'd in lock-step. Which may
>> potentially be awkward to maintain.
>>
>>  > I could also see /v1/xxxx and /v2/xxxx as means of supporting
>> incompatible versions.
>>
>> Might this approach lead to a higher likelihood of knowledge of the URI
>> structure leaking out to the client side?
> 
> It may. I think that this is my one concern around REST as it is today. 
> The client tools today make it easy to string up XML over HTTP iff the 
> clients know the url structure. The lack of an HATEoAS server or client 
> framework makes it much harder to gain adoption (today).
> 

This is definitely a problem with RESTEasy's client proxy framework and 
leads me to believe that I should constrain it a little more and add 
deeper integration with media type processors like JAXB and Jackson if 
its possible (JAXB is pretty inflexible).

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




More information about the rest-practices mailing list