Re: Is an XForm an application for, or a representation of an instance data?

"C. M. Sperberg-McQueen" wrote:
>
> Some very smart people I know have told me content negotiation is the
> right answer for a lot of things, so my instinct is to say it sounds
> promising.  But (a) they have also complained bitterly that conneg is
> not well implemented or understood, so I have never been sure it was
> possible to make it work without more effort than normal humans can
> expect to expend, and (b) there is always the possibility that conneg
> appears to be the right answer only because one cannot currently use
> it very well, and that concrete experience using it will reveal that
> it works well as an answer for some things and not for others.
> 

Actually, Accept-based conneg is the wrong answer here, because XForms
is not associated with a media type identifier, allowing it to be used
with multiple host languages and media types.  Building a conneg-based
solution for today's browsers would require parsing User-Agent, which I
don't advocate to begin with, and be completely fragile.

The solution here is to use a scripting language compatible with the
host language, to determine user-agent capabilities.  Which I've never
advocated over conneg for any other reason, because this is the only
case I've come across where it wouldn't be fragile.  If XForms were its
own language, it could have its own media type identifier; even still,
there's no guarantee that an XForms extension would add it to browsers'
Accept headers.

-Eric

Received on Thursday, 28 July 2011 02:45:33 UTC