A few weeks ago, in episode 14, Jeff and Joel were HTML, LINQ, Rails, et al:
Atwood: Even in Rails land, where they have the flexibility of essentially redefining the language at will, to solve all these problems -- at a steep performance cost, obviously, but still, the productivity is worth it -- they still, if you look at the HTML that they emit, it's still a mishmash it's basically tag soup. It's like HTML tag, and then a left-begin tag ...
So my question is: what's the best solution?
My assumptions:
- we need to generate dynamic content
- templates are good to avoid reduplication
- 1 + 2: there is some code-markup interface level; they cannot be completely de-coupled
- at some level, somebody has to understand code
- at some level, somebody has to understand HTML (or whatever rendering language)
- 4 and 5 don't need to be the same person, but they need to communicate well
- People who do 4 and 5 well are expensive and rare.
My favorite so far is the Apache-style: prefer custom tags over code in your template files. I love Ruby and Rails, but I think ERB is all wrong (and HAML, while prettier, isn't really any better).
(I was probably unclear on what I meant by "Apache." I think I meant "Apache JSTL," but it's been a while since I was in Java-land. I definitely meant custom tags, so programmers can build classes that implement some Tag interface, and designers can simply use them like HTML.)