Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: HTML::Template, CGI:Application and design methodologies

by Anonymous Monk
on Feb 11, 2004 at 03:59 UTC ( [id://328137]=note: print w/replies, xml ) Need Help??


in reply to HTML::Template, CGI:Application and design methodologies

Personally I use HTML::Tree, which is an unfortunately named module that conflicts with the CPAN module of the same name. I use this for two reasons. The first is the templated HTML is fully valid HTML; it can be validated via the w3c, viewed without the code at all, and edited by WSYWYG HTML editors. The second is it changes the paradigm from the code driving the HTML to the HTML driving the code.

As for different sections of content, for serious web apps we use a framework that uses a set of perl objects to render a page, and allow SSI include processing to bring the pieces of a page together. The entire page is then templated, and viewable as a whole, and (almost) regular HTMLand the code for the application is broken down into bite sized, reusable components.

PHP and friends keep the code and its relevant HTML together, but I dislike tying the two together. I feel embedding the code in the HTML is just as bad as embedding the HTML in the code; and I feel that extra tags for templating is just putting the code in the HTML in a different language. :)

  • Comment on Re: HTML::Template, CGI:Application and design methodologies

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-04-20 01:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found