in reply to Re: Re: Re: HTML::Template - what's the rule of thumb?
in thread HTML::Template - what's the rule of thumb?
Still I think in the long run, templating systems are a dead branch of the evolutionary tree: they are neither pure programs, nor pure mark-up but a hybrid of the two, which IMHO combine the bad things of both for little benefit.I'll disagree, on two levels.
One, in order to get a file that is "pure markup", you have to have some logic to generate that file. Parts of that logic will have static text, and parts must have enough dynamic logic (decision/iteration/subroutines) to be turing complete. That's actually a perfect place for a templating system!
Two, if you follow the MVC paradigm, your View usually ends up having to adapt to display the Model being tossed at it by the Controller. A good templating system has at least enough stuff to do that, although it doesn't need (or want) to have enough stuff to be the Controller itself. I think the failure of some templating systems is their attempt to be used as Model or Controller code.
An example of a failure of "pure markup" is XSLT. You end up twisting yourself around corners just to write programs in what tries to be a pure mark-up language. Feh.
If you think templating systems are a dead-end, you should probably describe what you would replace them with. It's also possible that you have a narrow application domain that you're specifically addressing. It'd be nice for us to know your scope of statement.
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: •Re: Re: Re: Re: HTML::Template - what's the rule of thumb?
by CountZero (Bishop) on Dec 21, 2003 at 10:41 UTC | |
by merlyn (Sage) on Dec 21, 2003 at 13:17 UTC | |
by CountZero (Bishop) on Dec 21, 2003 at 13:54 UTC | |
by dragonchild (Archbishop) on Oct 17, 2004 at 17:28 UTC | |
by CountZero (Bishop) on Oct 17, 2004 at 18:36 UTC |