Re: media types as anti-pattern (was: Why polyglot is needed)

On Tue, Mar 26, 2013 at 5:18 AM, Eric J. Bowman <eric@bisonsystems.net> wrote:
> Harry Halpin wrote:
>>
>> Yet I'm of the "media types might be an anti-pattern" opinion the
>> more I think about this given they can't be controlled often by
>> document authors.
>>
>
> An architecture not based on media types would change the nature of
> intermediaries, obsoleting much of the deployed infrastructure of the
> Web.  The result is some other pattern entirely, i.e. an architectural
> style which is no longer REST, which has yet to be defined.

If we move towards semantic REST services media types become a lower
level details out of the scope of the design of the actual API. This
is not incompatible with REST as Roy points out that REST can not only
be achieved by defining media types but also in defining "extended
relation names".

"A REST API should spend almost all of its descriptive effort in
defining the media type(s) used for representing resources and driving
application state, or in *defining extended relation names* and/or
hypertext-enabled mark-up for existing standard media types.". [1]

It seems natural that by having more versatile formats defining
formats becomes less and less important to the point that media-type
may fall in desuetude for the purpose of REST

Cheers,
Reto

1. http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven

Received on Monday, 1 April 2013 07:58:05 UTC