Don't specific media types introduce coupling?

Ruben Verborgh <[email protected]>
Newsgroups gmane.comp.web.services.rest
Message-ID <[email protected]>
Hi all,

It’s an often-discussed topic that continues to puzzle me:
self-descriptiveness is encouraged to reduce coupling, but how specific can we describe without introducing coupling?
And specifically: to what extent could “self-describing” formats such as RDF help out here?

Let me borrow the Maze+XML example used in a previous discussion [1].
So the problem is: a server exposes a maze, a client needs to be able to navigate through it.
Basically, there are two options:
1) Use a generic format (such as JSON) and explain separately what the different fields mean.
2) Use a specific format (such as Maze+XML); no need to explain, everything is in the media type.

At first, it seems like the second solution minimizes the amount of out-of-band information, as solution 1 involves a separate explanation document (which might or might not be expressed in a machine-processable way). But if you think about it, solution 2 has the exact same amount of out-of-band information, only this time it has moved to the interpretation of the media type’s specification. In both cases, the client needs to be adapted specifically to interact with the media type. And how decoupled is it when client and server are constrained to a specific message format?

Things _could_ be different with a self-describing format, as this might overcome the need for specific media types. So here’s another situation:
3) Use a self-describing format (such as RDF); no need to explain, and the client can work this out by itself.
(Although I’m being slightly overoptimistic about RDF now.) The idea would be that the client can interpret the representation as being a maze, and continue to use it that way.

My basic question is thus: do specific media types really reduce coupling, and if not, what does?

Best,

Ruben

[1] https://groups.google.com/d/topic/hypermedia-web/LdKfi47QCxw/discussion




------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/rest-discuss/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/rest-discuss/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.