On Mon, Jan 18, 2010 at 10:48 PM, Timothy Perrett <[email protected]> wrote: > Jeppe, > > Very interesting stuff - agree with most of your points, however, this > statement: > > "While you can’t get code into your templates, it’s easy to get UI > into your code, which is (almost) just as bad. The dynamic part of the > UI is done by snippets and they of course need to emit HTML. But it is > easy to put all kinds of style, class attributes as well as other > things which belong in the template, into this dynamically generated > code. This makes it difficult for designers to modify the layout and > styling without touching the Scala code." > > I think this generally goes back to developers being pretty lazy in > general; that is, the path of least resistance is the easier option > rather than being disciplined in their coding.
I agree, it's not Lift's fault per se. But for various reasons (time, lack of knowledge etc) often the path of least resistance is chosen :-) At least I've been bitten by this when we had to change the layout of some the early code we wrote! > What would you suggest from your experience could be a solution for this? It > seems the > solution would be to make it easier to "do the right thing" rather > than use xml literals and make bad code, but *how* could this actually > be done in a meaningful way? Education, samples etc. are always helpful. The one thing that immediately comes to mind, styling wise, (and this has been discussed on the list I think, with no really good solution) is that it takes a fair amount of work to make dynamic attributes in the template (ie you need to bind with AttrFuncParam, you cannot add a new attribute without changing code etc) /Jeppe
-- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
