> I'm using the Template Toolkit for generating static web sites and I
> am very happy with it.  Yet, despite the claims, it still mixes a lot
> of presentation with program logic.

While I agree that code should be divided neatly, I think that
constructing a wall of templates often doesn't help my code.  It
usually keeps me from refactoring stuff to a more appropriate home.

Representations of objects make the most sense on the object, not
buried in a template somewhere.  When I work on a command line app, I
put the to_s methods on the object... so now when I work on a web app,
I also put the to_html methods on the object.

Maddeningly, these to_html methods usually are born in templates. 
After I look at the template, I can see the need for new methods on
the objects -- but I have to write the html first.  Otherwise, I don't
know what those new methods should be.

This is a big reason I like to 'invert' the code with eruby (or erb!).
 I know that I can refactor the rhtml when I realize where the code
should go.

If it turns out that I need multiple views for an object, than I can
refactor in some kind of Strategy pattern.  But this situation is
rare.  The more common effect of putting up a wall between my code and
html is that the presentation doesn't get properly refactored.

In general, I think it's alot easier to refactor than to design :-)

~ Patrick