W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2012

Re: [whatwg] runat (or "server") attribute

From: Nils Dagsson Moskopp <nils@dieweltistgarnichtso.net>
Date: Mon, 14 May 2012 12:49:30 +0200
To: whatwg@lists.whatwg.org
Message-ID: <20120514124930.1906cab9@desudesudesu>
Odin Hørthe Omdal <odinho@opera.com> schrieb am Sun, 13 May 2012
17:45:46 +0000:

> >> Just use type="text/server-js"...  
> > Is that really a good idea? It seems odd to use a mime type for
> > such a reason.  
> I thought it was quite a nice idea.
> Why would it not be?  

I find it profoundly odd to define templating language bits that are
not used (or even usable) by User Agents – especially because there
already are lots of widespread templating solutions.

> It's describing what's in the script tag, just
> like it's supposed to do. It's even a quite much used pattern for
> doing client side templates <script type="text/template"> on the web
> today.  

This appeal to tradition is weak and – arguably – intellectually
dishonest. Table layout once was a “quite much used pattern”.

> Mime types are not magical any more. Before we could make our own
> text/x-whatever, but prefixes are not really any use. If you want
> something specific to your program you could always use something
> specific as prefix, -- but for this use case just doing
> text/server-js  seems rather nice :-)  

Deviating from set standards regarding structured data in networks
solely for aesthetic reasons creates a world of pain for data consumers.

I once wrote an program to check for dead links that failed in it's
task quite unexpectedly when it encountered a web site whose owners
decided that “HTTP status codes are not magical any more” and answered
every request with a 404 (plus the actual content).

All problems with hashbang javascript routing are an instance of this
flawed line of reasoning (returning 200 for every link). If you do not
want to appear as a sociopathic hipster programmer, please emit
conservatively and use a prefix. Alternatively, register your MIME type.

Nils Dagsson Moskopp // erlehmann

Nils Dagsson Moskopp // erlehmann
Received on Monday, 14 May 2012 10:50:28 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:42 UTC