in reply to HTML::Template vs. CGI.pm
I'm working on a big complicated system in which I've outputted lots of HTML with CGI.pm (writing tables is still almost irresistibly compact with CGI.pm).
But despite that we've never had a dedicated HTML person -- it's still engineers writing both HTML and doing the programming -- I've regretted it, and have been very happy we're almost through migrating to a template solution.
Outputting the HTML programatically makes it too damn easy to do things that'll bite you in the butt... like having a given page ultimately made from bits of codes scattered across your script and multiple modules, such that wanting to change a given something about the page can create a headache first in just finding where to make the change.
If you want to make comprehensive changes to your pages' appearance, where you have to look is isolated in advance with a templating system.
Having them intermingled makes it easy to break program logic when you just wanted to make a change to the display elements. You'll probably find and fix the problem readily enough, but probably could have avoided it all along with a templating system in which, when you're modifying, testing and debugging how something looks, you know that's all you're doing.
Plus all the good advice you've already heard about what happens when an HTML person is added, the advantages of using an HTML editor, etc., etc.
Unless you're sure the program's a one-time knock-off for only your own use, writing your HTML with CGI.pm is false laziness.
|
|---|