in reply to Re: •Re: Re: Re: Re: HTML::Template - what's the rule of thumb?
in thread HTML::Template - what's the rule of thumb?

I think you're missing the point of a templating system. It has nothing to do with making sure that your display logic doesn't have any programming stuff in it. In fact, I am switching from HTML::Template to Template Toolkit precisely because it has better programming stuff in it.

Within MVC (which it seems you do use - good for you!), you will have three programming layers, hopefully separated by rather strict APIs. Each of the layers, most likely, will have a ton of programming in them, and that's ok. Very often, one cannot convert a data structure into something to be displayed without it.

The notion that templating systems should be as dumb is possible is a mis-meme, promulgated by the facts that

Yes, good display logic is expensive. Sometimes, the only way to do something is to drop into a full-featured language. So?

Remember something - a popular templating system for Windows programs written in Visual C++ is Visual Basic.

Being right, does not endow the right to be rude; politeness costs nothing.
Being unknowing, is not the same as being stupid.
Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

  • Comment on Re^6: HTML::Template - what's the rule of thumb?

Replies are listed 'Best First'.
Re^7: HTML::Template - what's the rule of thumb?
by CountZero (Bishop) on Oct 17, 2004 at 18:36 UTC
    My oh my, old sins do get visited upon us in eternity!

    dragonchild, I must confess that for the second version of my intranet claims system, I have switched to Template::Toolkit, but it still outputs XML and this XML still gets tranformed into HTML through the services of XSLT and CSS.

    The reason I (finally) switched to a templating system was that is allowed me to write more "condensed" code, i.e. lots of back-ground functions get "glossed over" by using the template-constructs (such as connecting to the database; managing arrays and hashes; ...).

    I'm still not entirely happy with the ideas behind templating systems,nor with the practical implementations, but untill I have lots of free time and start writing it myself, I will have to use and make-do with what exists! That being said Template::Toolkit is certainly one of the better templating systems around.

    CountZero

    "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law