decentralized media-types

2008-02-09 @ 18:02#

interesting posts this week on the notion of decentralizing the media-types used in the Accept and Content-Type headers.

i like the idea of creating a way to 'point' to schema-type documents for various documents. i also like the idea of the application/data-format mime-type. basically, a 'generic' type that also allows for a pointer to the schema or other description document. however, i am a bit concerned about the 'watering down' of the validity of IANA-registered media types. i suspect that introducing this generic type would allow for quite a bit of abuse by 'lazy' web developers.

i like the advice found in the REST Wiki:

Define as few content types as possible
  • Look for opportunities to use the same content type in different applications
  • Even if the resources don't immediately appear to be identical, they may be able to use the same content type.
  • XML content types are robust to describing an overlap between the schemas of different resources.
  • You might be surprised how many resources in a railway can be adequately represented as a list of trains, given an appropriately broad definition of the content of a single train.