From: Florian Weber Date: 2004-07-26T16:20:18+09:00 Subject: Re: rubyonrails and cgikit comparison > -I would work with css > -The designer should not be concerned on the conditions to have one or > the other color. He designs a red class, and a black, and the code > determines which is used. sure. css classes would have been better, i just wanted to keep it as simple as possible =) > ex: > #template > > > #binding > mylink : CKHyperlink > { > href="foo" > class = link_class > } > > > #ruby code > > #this file contains REDLIMIT value used throughout the appplitation > require "myparameters" > > if @some_stuff < REDLIMIT > @link_class = "redcss" > else > @link_class = "blackcss" the problem with that is that you're app all of the sudden knows something about css. you have presentation logic in your application layer. imho thats horrible : / > From our discussion, it seems you prefer to have a bit of code in the > template, but I prefer to have a bit of presentation logic in the > code. > My fear it that the code in the template could become too important. i'm okay with code doing presentation logic yup. like gabriele mentioned earlier, i think the difference is that you prefer the indirection of not referencing data directly, while i'm okay with it and like not to have the overhead of a abstraction and indirection there.. > I also think it's much easier for a programmer to give a certain class > attribute to an element, based on conditions in his code, than for a > designer to enter the conditions to use a class or another. Giving a > css class doesn't get you inside the css, working with variables in > the template gets you inside the code. giving a css class gets you inside the presentation code. what if the designer/html guy needs to rename the class for some reason?