Libraries for template animation / unobtrusive server scripting?
Are there any tools that make "template animation" workable on the server side? I'm specifically looking for Python on the server side, but don't mind options that are useful in other languages.

Background is this blog post -- entitled "[Your templating engine sucks and everything you have ever written is spaghetti code (yes, you)][1]" -- which touts template animation as the "holy grail" to avoid spaghetti code in templates. Spaghetti being defined as mixing of two or more languages.  In template animation the template is valid HTML straight from the designer, not even extended HTML like Genshi, that is "animated" by server side code to produce the dynamic output for the user.

I imagine template animation can get messy - for example picking out the first row from a table in the template, then iterating over records to put text in the rows dt's and appending a copy of the row to the table.  Such code would be pretty tightly integrated with the HTML. 

The closest tool I know of is [hquery][2] for Ruby, which calls itself "unobtrusive server scripting".  There's also [diazo][3] which uses rules to update a static HTML theme from dynamic unstyled HTML - does not quite the definition of template animation, and has 3 parts (HTML theme + rules + HTML-generating-code) instead of 2 (theme + code)


  [1]: http://www.workingsoftware.com.au/page/Your_templating_engine_sucks_and_everything_you_have_ever_written_is_spaghetti_code_yes_you
  [2]: https://github.com/choonkeat/hquery
  [3]: http://diazo.org/
Libraries for template animation / unobtrusive server scripting?
===

Are there any tools that make "template animation" workable on the server side? I'm specifically looking for Python on the server side, but don't mind options that are useful in other languages.

Background is this blog post -- entitled "[Your templating engine sucks and everything you have ever written is spaghetti code (yes, you)][1]" -- which touts template animation as the "holy grail" to avoid spaghetti code in templates. Spaghetti being defined as mixing of two or more languages.  In template animation the template is valid HTML straight from the designer, not even extended HTML like Genshi, that is "animated" by server side code to produce the dynamic output for the user.

I imagine template animation can get messy - for example picking out the first row from a table in the template, then iterating over records to put text in the rows dt's and appending a copy of the row to the table.  Such code would be pretty tightly integrated with the HTML. 

The closest tool I know of is [hquery][2] for Ruby, which calls itself "unobtrusive server scripting".  There's also [diazo][3] which uses rules to update a static HTML theme from dynamic unstyled HTML - does not quite the definition of template animation, and has 3 parts (HTML theme + rules + HTML-generating-code) instead of 2 (theme + code)


  [1]: http://www.workingsoftware.com.au/page/Your_templating_engine_sucks_and_everything_you_have_ever_written_is_spaghetti_code_yes_you
  [2]: https://github.com/choonkeat/hquery
  [3]: http://diazo.org/