|Keep It Simple, Stupid|
Re: HTML::Template, CGI:Application and design methodologiesby jerrygarciuh (Curate)
|on Feb 11, 2004 at 01:52 UTC||Need Help??|
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.
"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