[EMAIL PROTECTED] wrote:
> I know alot of you must do this.
> 
> I want build a simple APP framework to chain the output of all my content
> handlers, which would live in many different PM's for easy code management.
> 
> for example:
> APP::Header
> APP::Footer
> APP::Content
> APP::Chemical_entry
> APP::...
> APP::Controller
> - would push_handlers based on uri and/or app logic
> - The result would be the entire html output in ( via print array )
> 
> WHY ( so that my content can: )
> 
> - pass named paired parameters to following handlers
> - modify previous content ( eg update "html" header code with a msg from
> main content handler )

This is not the best way to think about the problem, especially if you 
want it to be "FAST, FAST, FAST".  Having one piece of code manipulate 
the HTML output from another piece is messy, slow, and will probably 
break every time your designers change the HTML.  Instead, build a 
pipeline for working on the data to be displayed, which you can easilly 
pass through method arguments or $r->pnotes(), and then run a template 
(which may include many smaller templates) at the end to generate HTML. 
  There are several templating tools you can use for this, and I've 
summarized the best ones at http://perl.apache.org/features/tmpl-cmp.html.

- Perrin

Reply via email to