in reply to The hidden charm of Template::Toolkit (and templates generally)

If the web-page skeletons are written by perl-savvy developers, there is no benefit in using a templating system over perl-code. Actually, the perl-code you present could be considered some sort of a templating system in its own right.

The beauty of an MVC-system is not that it uses a templating system but makes a clear separation of concerns between the Model, Controller and View parts of the application. How each of these components is practically implemented is of far less importance and a templating system is but one possibility.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

  • Comment on Re: The hidden charm of Template::Toolkit (and templates generally)

Replies are listed 'Best First'.
Re^2: The hidden charm of Template::Toolkit (and templates generally)
by Your Mother (Archbishop) on Jan 07, 2008 at 20:02 UTC

    I think I disagree. You seem to be saying that the template (the View) is basically unnecessary if the Perl (the Controler) does all the lifting for it. It's true you can do it that way but as you can see, you are left with a MC instead of an MVC. Anything that manipulates (without changing) data purely for display should be in the View (unless it's complex to a degree as to make the template/View version toxic for readability/debugging compared to a more direct Perl/Controller version).

      Not at all, I said that the View does not have to be a templating system and may very well be pure perl-code. In an MVC it is the separation of concerns that is key, not the way each separate part of it is implemented.

      CountZero

      A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

        Yeah, sorry. Your second paragraph is quite clear.