From: Garrett Smith on 2 Apr 2010 00:14 Michael Haufe ("TNO") wrote: > Eric Bednarz <bedn...(a)fahr-zur-hoelle.org> wrote: >> People do all sorts of things, like disguising opinion as fact to >> support their polemic. Go figure. > > "Michael Haufe (\"TNO\")" <t...(a)thenewobjective.com> wrote: >> Do you have a point to make or not? > > Eric Bednarz <bedn...(a)fahr-zur-hoelle.org> wrote: >> Did you? You appeared to be merely paraphrasing > > Then try reading again. > > Eric Bednarz <bedn...(a)fahr-zur-hoelle.org> wrote: >> (�People are using class names for things they weren't meant to be >> used for.�) >> >> what David already said >> >> (�Using class names for something other than intended indicates a >> bad design.�) > > Use proper attribution please. > > Eric Bednarz <bedn...(a)fahr-zur-hoelle.org> wrote: >> Pardon my French, �weren�t meant to be�, �other than intended�, either >> the bullshit detector should go berserk or the two of you should reveal >> your sources. > > You're telling me you need a W3C standard to understand the concept of > the separation of concerns? > I don't read that at all. The HTML specification does not state that the `class` attribute is to limited for CSS. I do not see a strong reason for limiting class to be only about styles. > "Michael Haufe (\"TNO\")" <t...(a)thenewobjective.com> wrote: >> I don't see how mixing semantics with presentation is desirable as >> mentioned in my previous post. > > Eric Bednarz <bedn...(a)fahr-zur-hoelle.org> wrote: >> So why do you introduce presentation to a discussion that isn�t related >> to it? > > The text of the thread begs to differ. > The argument of presentation was a given reason for why the class attribute should not be added for scripts. AIUI, that reason is that `class` is meant to associated only with CSS. Also, I disagree with that reason (IIUC). I do not see why an element that belongs to a class must have CSS styles. The thinking behind giving something a class is, for me, to group it into a class. Coincidentally, most of the time I add script that is concerned with an element, the element is styled to look different. Regarding removal such features, I have noticed a tendency among other developers to sometimes not remove every part of that feature. When a particular feature is removed, it should be removed completely. If the HTML is removed, the javascript and css for that feature should also be removed. Otherwise, the dead code will end up confusing others and adding bloat. Likewise for server side code. -- Garrett comp.lang.javascript FAQ: http://jibbering.com/faq/
From: David Mark on 2 Apr 2010 09:56 Garrett Smith wrote: > Michael Haufe ("TNO") wrote: >> Eric Bednarz <bedn...(a)fahr-zur-hoelle.org> wrote: >>> People do all sorts of things, like disguising opinion as fact to >>> support their polemic. Go figure. >> >> "Michael Haufe (\"TNO\")" <t...(a)thenewobjective.com> wrote: >>> Do you have a point to make or not? >> >> Eric Bednarz <bedn...(a)fahr-zur-hoelle.org> wrote: >>> Did you? You appeared to be merely paraphrasing >> >> Then try reading again. >> >> Eric Bednarz <bedn...(a)fahr-zur-hoelle.org> wrote: >>> (�People are using class names for things they weren't meant to be >>> used for.�) >>> >>> what David already said >>> >>> (�Using class names for something other than intended indicates a >>> bad design.�) >> >> Use proper attribution please. >> >> Eric Bednarz <bedn...(a)fahr-zur-hoelle.org> wrote: >>> Pardon my French, �weren�t meant to be�, �other than intended�, either >>> the bullshit detector should go berserk or the two of you should reveal >>> your sources. >> >> You're telling me you need a W3C standard to understand the concept of >> the separation of concerns? >> > > I don't read that at all. The HTML specification does not state that the > `class` attribute is to limited for CSS. You don't read *anything*, do you?
From: Scott Sauyet on 2 Apr 2010 11:40 David Mark wrote: > Garrett Smith wrote: >> Michael Haufe ("TNO") wrote: >>> You're telling me you need a W3C standard to understand the concept of >>> the separation of concerns? > >> I don't read that at all. The HTML specification does not state that the >> `class` attribute is to limited for CSS. > > You don't read *anything*, do you? I've just re-read this entire thread, and I've seen nothing that offers a good reason why to be more restrictive than the spec's definition, which allows the class attribute to be used for "general purpose processing by user agents." The closest I've seen was made by David Mark, when he suggested that there could be collisions with stylesheets over the use of a name. Since we should ideally be using meaningful values for the class attribute, regardless of whether it's for stylesheets or for other purposes, this shouldn't actually cause an issue; and if it does, how hard is it to catch in testing and fix with a synonym? Other than that, all I've seen is claims that it's a bad idea, with no arguments to back up these claims. Could someone making the argument against the use of class names for non-CSS purposes state some actual *reasons*? Thanks, -- Scott
From: David Mark on 2 Apr 2010 12:15 Scott Sauyet wrote: > David Mark wrote: >> Garrett Smith wrote: >>> Michael Haufe ("TNO") wrote: > >>>> You're telling me you need a W3C standard to understand the concept of >>>> the separation of concerns? >>> I don't read that at all. The HTML specification does not state that the >>> `class` attribute is to limited for CSS. >> You don't read *anything*, do you? > > I've just re-read this entire thread, and I've seen nothing that > offers a good reason why to be more restrictive than the spec's > definition, which allows the class attribute to be used for "general > purpose processing by user agents." But see the comment above (two posts back?) That's what I was referring to. In other words, some (including me) are saying it doesn't natter what the specs say (or don't say).
From: "Michael Haufe ("TNO")" on 2 Apr 2010 13:21
On Apr 1, 11:14 pm, Garrett Smith <dhtmlkitc...(a)gmail.com> wrote: > > I don't read that at all. The HTML specification does not state that the > `class` attribute is to limited for CSS. Once again, I'm stating that is the problem with it. The HTML 4.01 spec states a class is for both styling AND "For general purpose processing by user agents" This is a mistake. Being liberal in what you accept does not make other conservative in what they give. > I do not see a strong reason for limiting class to be only about styles. The separation of concerns. An attribute should have one primary purpose with other purposes built upon it otherwise you are forced to understand not only that element, but also its context in the markup and, god-forbid according to what the spec says, potentially the browser as well. > I do not see why an element that belongs to a class must have CSS > styles. The thinking behind giving something a class is, for me, to > group it into a class. The logical relationships between data (grouping) should not be tightly bound with the presentation of that data. > Coincidentally, most of the time I add script that is concerned with an > element, the element is styled to look different. If behavior is built upon the rest of the model, I see no reason to disagree. The problem arises when you have no boundary between them > Regarding removal such features, I have noticed a tendency among other > developers to sometimes not remove every part of that feature. When a > particular feature is removed, it should be removed completely. If the > HTML is removed, the javascript and css for that feature should also be > removed. Otherwise, the dead code will end up confusing others and > adding bloat. Likewise for server side code. Ok, but what does that have to do with it? |