more useful options | |
PerlMonks |
Re: Template::HTML - what's the rule of thumb?by bradcathey (Prior) |
on Dec 18, 2003 at 13:22 UTC ( [id://315511]=note: print w/replies, xml ) | Need Help?? |
I've been following, and enjoying, kiat's recent posts because as a web designer I feel we are on parallel journeys in learning how to use Perl to support our development. Thanks kiat for your unabashed posts. Web development in our shop is done as a team effort. We have the account folks to cast the vision; graphic designers to develop the look, feel, navigation; and then a programmer or two to make it work--connecting the web-based content editors with MySQL and Perl, similar to kiat's scenario. Before we discovered HTML::Template (H::T)*, all our output was heredocs. This drove the the designers crazy--to make even a small change they felt they had to rely on the programmers (designers can get nervous around Perl). In fact, it frustrated everyone because it took two bodies to make the revision--inefficient to say the least. H::T changed that, of course, because the subtle design changes could be made without bothering the rest of the team. But not completely, because we were still including too much HTML in the Perl scripts. However, as we have moved more HTML back to the templates docs by using, as barrd points out, the H::T conditionals, we are giving more control back to the designers--all the HTML is accessible to their layout programs (Dreamweaver or GoLive). All that to say: the rule of thumb in our shop is to distill our code down to the point where we are using every possible convention of H::T to keep as much HTML in the .tmpl doc as possible. So, anytime something needs to be displayed in the browser window, whether a full-fledged content page or a simple error message, an .tmpl doc is doing the work. The look and brand of the site is maintained. Bottomline: keep code and HTML as separate as possible. *I realize there are other templating systems, we just happened to get hooked on H::T —Brad "A little yeast leavens the whole dough."
In Section
Seekers of Perl Wisdom
|
|