[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
RE: [xml-dev] Transformative Programming: Flow-based, functional,and more
- From: "Rushforth, Peter" <Peter.Rushforth@NRCan-RNCan.gc.ca>
- To: Peter Hunsberger <peter.hunsberger@gmail.com>, Uche Ogbuji<uche@ogbuji.net>
- Date: Fri, 18 Oct 2013 19:20:01 +0000
> the fact that the parties do in fact have expectations as to the contents of the resources and the HTTP headers and MIME types shape those expectations. If I claim to be delivering you XML
the loose coupling is now a bug, not a feature.
Therein lies an essential point. Merely delivering application/xml is not good enough, since (according to REST) the engine of application state is in
the content, application state is now effectively stalled when it receives such a message. The only useful thing one can do with application/xml is present syntax coloured elements attributes and angle brackets. No application would request application/xml
if it had/knew of a more specific option, in which the *semantics* of the markup had been documented, by a media type registration possibly.
If I send application/json to you after you have negotiated for application/xml, I have broken the contract of the Web. Shame on me. I'm ignoring the separation
of resource identity from representation. If I allow links (resource identifiers) to be marked up (assuming my clients know how to recognize a link I mark up) without also marking up representation metadata, I continue to ignore that separation. That all
works well when I completely understand the assumptions built in to the semantics of the format I'm processing (e.g. I know that an
img@src should lead me to a png, jpg etc. Likewise an
a@href leads to another text/html representation). But it doesn't work at all when I don't know what representation to request. And in the case of the XML family of formats, there may certainly be more than one representation of the
resource which could be described as application/xml. How does the server choose?
The diversity of markup (where it exists at all) for accessing the Web from XML *impedes* its progress.
The loose coupling that is often touted as a feature of REST is that betwen client and server. There remains strong, tight coupling between the client
and the format, as well as strong coupling between the server and the format. But because the format is (potentially, as in a media type registration) defined outside of the scope of the client organization and the server organization, the pain is slower
to materialize.
Should XML ever decide to incorporate hypermedia into application/xml, or some future iteration of it, it would enable formats based on it to benefit from
that loose coupling.
Cheers,
Peter Rushforth
Uche,
I think we've got a little mixture of concerns going on here. I'd expect one can describe some form of (2D or more?) continuum from tuples to DCS/COBRA and if you did so, REST would be sitting far closer to the simple tuple origin than the other. However,
REST is an architecture for data exchange/manipulation, tuples are a formal mathematical model. Even at the REST resource level I'd be hard pressed to apply the tuple description to the resources unless you want to regard them as purely opaque blobs? I actually
like that view of the REST resources (since, as you point out it allows for loose coupling), but it denies the reality that the utility of REST comes from the fact that the parties do in fact have expectations as to the contents of the resources and the HTTP
headers and MIME types shape those expectations. If I claim to be delivering you XML and you actually get JSON the loose coupling is now a bug, not a feature. (Though SImon seems to imply I should just go ahead and figure out what parser to use and cope
with it anyway... ;-)
- References:
- Transformative Programming: Flow-based, functional, and more
- From: "Simon St.Laurent" <simonstl@simonstl.com>
- Re: [xml-dev] Transformative Programming: Flow-based, functional, and more
- From: Peter Hunsberger <peter.hunsberger@gmail.com>
- Re: [xml-dev] Transformative Programming: Flow-based, functional, and more
- From: Uche Ogbuji <uche@ogbuji.net>
- Re: [xml-dev] Transformative Programming: Flow-based, functional, and more
- From: Peter Hunsberger <peter.hunsberger@gmail.com>
- Re: [xml-dev] Transformative Programming: Flow-based, functional,and more
- From: "Simon St.Laurent" <simonstl@simonstl.com>
- Re: [xml-dev] Transformative Programming: Flow-based, functional, and more
- From: Peter Hunsberger <peter.hunsberger@gmail.com>
- Re: [xml-dev] Transformative Programming: Flow-based, functional,and more
- From: "Simon St.Laurent" <simonstl@simonstl.com>
- Re: [xml-dev] Transformative Programming: Flow-based, functional, and more
- From: Peter Hunsberger <peter.hunsberger@gmail.com>
- Re: [xml-dev] Transformative Programming: Flow-based, functional, and more
- From: Uche Ogbuji <uche@ogbuji.net>
- Re: [xml-dev] Transformative Programming: Flow-based, functional, and more
- From: Peter Hunsberger <peter.hunsberger@gmail.com>
- Re: [xml-dev] Transformative Programming: Flow-based, functional, and more
- From: Uche Ogbuji <uche@ogbuji.net>
- Re: [xml-dev] Transformative Programming: Flow-based, functional, and more
- From: Peter Hunsberger <peter.hunsberger@gmail.com>
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]