Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

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

by jerrygarciuh (Curate)
on Feb 11, 2004 at 01:52 UTC ( #328102=note: print w/ replies, xml ) Need Help??


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

I am currently in the midst of building a largish application using Template-Toolkit, CGI::Application, and Class::DBI.

I have been contempplating the best way to make a clean flow and I have found that building the page from component templates and keeping all of the "interface decisions" in the template logic has definitely made my application logic much more clear.

I think I have also really benefitted from the fact that Template-Toolkit understands Perl objects, such that I can pass large constructs from the application into the template under a consolidated name space and without a million individual args. So my advice would be to let the templates build themselves from components based on the data they receive and let your application assemble the data but leave the interface alone.


HTH
jg
_____________________________________________________
"The man who grasps principles can successfully select his own methods.
The man who tries methods, ignoring principles, is sure to have trouble.
~ Ralph Waldo Emerson


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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2014-07-13 14:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (250 votes), past polls