Re: Don't specific media types introduce coupling?
Alan Dean <[email protected]>
| Newsgroups | gmane.comp.web.services.rest |
|---|---|
| Message-ID | <CAJazdWRrvzDaKuhsFC+ayD_oEvGY8cUXP2X5XVH1ZzaUtb+usw@mail.gmail.com> |
Ruben, You could implement a Maze using HTML: all the client would need to know is how to follow hyperlinks to navigate the maze like https://en.wikipedia.org/wiki/Colossal_Cave_Adventure. Regards, Alan Dean On Thu, Oct 18, 2012 at 11:49 AM, Ruben Verborgh <[email protected]>wrote: > 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 > > > >