On Feb 15, 7:01 pm, "Nick Murdoch" <[EMAIL PROTECTED]> wrote:

> On Fri, 15 Feb 2008 23:30:57 -0000, George Sakkis
>
> <[EMAIL PROTECTED]> wrote:
> > - Replacing Genshi with Cheetah or Mako for better performance,
> > modularity and reusability (XIncludes and match templates suck).
>
> Unless your application absolutely must be the fastest it can possibly be,
> I wouldn't switch away from Kid/Genshi. I used Cheetah in one old project
> and the templates quickly become unmanageable with the difference between
> Cheetah markup blocks and HTML-logical blocks. I also find Cheetah syntax
> clunky and annoying. I imagine the same for Mako.

I agree that a single markup is more pleasing to the eye, but syntax
is rather a minor issue in this case. For one thing, the same
developers that write the MVC code write the templates too, so a
"designer friendly" template language is not a necessity. For two, we
don't use WYSIWYG html editors so again an editor friendly language is
optional.

My main frustrations so far have been with modularity & reusability,
expressive power (ugly kludges to make up for lack of statements) and
performance, in this order of importance. I don't think I have grokked
yet what match templates (py:match) can do that can't be done with
functions (py:def), or how to use them effectively for non-trivial
examples. Same for using XInclude to include anything more complex
than a single master file, or making sure that a template is included
*exactly* once.

Perhaps there are solutions and workarounds to these issues that I am
still missing but at the end of the day it comes down to the
philosophy of whether a template language should be a real programming
language or crippled by design. I understand that in some real world
cases the latter is preferable or even required, but so far in this
projects it seems it's more of a hindrance.

George

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to