Beefy Boxes and Bandwidth Generously Provided by pair Networks
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??


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

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."

Replies are listed 'Best First'.
Re: Re: Template::HTML - what's the rule of thumb?
by adamk (Chaplain) on Dec 21, 2003 at 05:17 UTC
    Here Here!

    I believe too many programmers don't think enough about division of labour issues like this.

    When doing any Application + Templates type work, you should be looking to seperate form and function as much as possible. And this often means making your templating system as stupid, simple and web designer friendly as possible.

    Ideally, you want to be able to write your application code anyway you like and have ex-receptionist-web-designer-who-doesn't-know-HTML-but-can-work Dreamweaver, or clueless-Marketing-Director-that-likes-to-tweak-the-copy-on-pages, to be able to make changes here and there and not be able to break it. Having other people doing non Perl related things is GOOD!

    For the next step, they should also be able to use things like Dreamweaver Templates and Library items across both the static website AND your dynamic templates and have it "just work"

    Get something like this working well, and your designers will love you, and be much more efficient too. Hey, we have to compete with India somehow, and the more efficient your people are, the less likely the role is to be shipped offshore. :)

    It's also the primary reason that I've been saying for years that ASP/JSP/PHP or any other server page type languages don't scale up enough, because it's way to easy for the above mentioned people to break it.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://315511]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (10)
As of 2024-03-28 12:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found