Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: HTML - sharing design and logic

by perrin (Chancellor)
on Jul 01, 2004 at 15:00 UTC ( #371108=note: print w/replies, xml ) Need Help??


in reply to HTML - separating design and logic

The point is not to keep ALL logic out of your template but to keep everything except display logic out. Your "another way" approach does not put any application logic (database work, user pref manipulation, etc.) in the template. Having to update both the Perl code and the templates when adding a new thing to be displayed is not a bad thing. There are always these two tasks (update code, update display) even if you have no separate templates.

By the way, I would make each nodelet a separate included template, and just pass a list of nodelet templates to include.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://371108]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2016-12-04 19:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (69 votes). Check out past polls.