[whatwg] [web-apps] Some comments

Laurens Holst lholst at students.cs.uu.nl
Fri Nov 12 17:50:20 PST 2004


Ian Hickson wrote:
>>>The difference is that relying on JS is legitimate, while relying on CSS
>>>is not.
>>
>>Could you please explain how you arrived at this conclusion?  It's not
>>supported by HTML or WCAG specifications.
> 
> It's not something you'd expect to see in a specification. It's a 
> fundamental concept in the architecture of the Web. Media-dependent and 
> platform-specific material has to be optional, since you can't expect to 
> support every medium or platform (the platforms might not yet exist). On 
> the other hand, content which is key to the application -- such as the 
> logic behind a calculator -- clearly can't be optional.

According to the well-known MVC (Model-View-Controller) design pattern, 
by many considered a best practice to aim for as much as possible, 
scripts should be separated from content and style. At least it kind of 
translates to that (I know this is not 100% correct). The W3C recommends 
the same separation, although I forgot where I read that so 
unfortunately I cannot provide a link at the moment.

MVC is described here, for example: http://en.wikipedia.org/wiki/MVC .
But I'd say you are very likely familiar with it.

Something to consider, I'd say :). One thing I know for sure (okay, 
okay, /in my opinion/) is that it is much more convenient to have 
scripts in a separate file than to litter your HTML with it.


~Grauw

-- 
Ushiko-san! Kimi wa doushite, Ushiko-san!!



More information about the whatwg mailing list