[cgiapp] strategies for decoupling HTML::Template

Timothy Appnel tim at appnel.com
Mon Oct 22 17:46:20 EDT 2007


On 10/22/07, Jason Purdy <jason at journalistic.com> wrote:

> H::T is a simple and fast templating engine that enforces strict MVC,
> too.

Simple, yes -- to a fault.  In my experience, I find what constitutes
the parts of MVC to be subjective. I haven't heard much of an argument
about what belongs in the model so much as I heard a lot of debate
about what constitutes controller logic and what belongs in the view.

My opinion is shaped more by practicality then idealism. In my
environment interface/experience designers are totally different
people and skills. (There are those who would argue this shoudl always
be the case, but I recognize this is not always practical either.)
It's annoying to have to keep going into my code to tweak the
formatting of a date value or calculate conditional logic down to a
boolean value because the designer changed their mind. It's equally as
annoying (and wasteful) to have to build and stash all of these values
from an object that already contains all of that just in case the
designer needs. So to me H::T excludes a lot of what I think should be
in the view. Its for this reason that why H::T had to be
decommissioned in MT4. The conversion of reading with objects and
their methods (calculated values) is not complete, but it's going to
reduce the amount of code in run modes a great deal and make the logic
in the views much more reusable.

I guess my point here is that there are different needs that its
rather pointless debating who is right or which template engine is
better. Its a shame CGI::App made that decision and it would be nice
to think that there was more community spirit here then the hard line
Jesse took, but things could be worse.

<tim/>


More information about the cgiapp mailing list