Chris Winters <[EMAIL PROTECTED]> wrote: >On Sat, 2002-08-17 at 19:31, Jonathan Lonsdale wrote: >> I'm curious to know how people approach application development with >> mod_perl in situations where there could be dozens of distinct >> screens/interfaces. I'm currently using the HTML::Template system. >> >> Here's a few approaches I thought of: >> >> 1. Single monolithic content handler. Could be hard to maintain. >> 2. Distinct content handlers each with their own Location directive. Could >> be a pain to maintain the server config. >> 3. Take a small performance hit and use an Apache::Registry script for each >> screen to handle the content phase. Use 'PerlSetupEnv Off', $r and Apache:: >> modules and don't bother being backwardly compatible with CGI. > >There's a separate one that's used in OpenInteract: create a single >content handler that uses some sort of lookup table to map requests to >handlers. This lookup table can be maintained separately from the apache >configuration and can generally be more flexible, allowing for >application-level security settings, etc.
Yet another of the many ways : This is similar to what I am doing with the Uttu/Gestinanna projects. Gestinanna is designed around the MVC paradigm. I have Uttu provide my database/cache creation, application configuartion, and uri<->handler mapping which in this case (for web applications with a lot of screens) maps to a Mason dhandler. The dhandler makes sure the proper state machine description is in memory and then continues the state machine execution based on the information sent from the client. The state machine tells the dhandler which view to send back to the client. I have several tricks up my sleeves to allow multiple state machines to be active simultaneously in a session and for even different parts of a state machine to be active simultaneously. I am using Template Toolkit to produce the views (since the people responsible for the views don't like code) and AxKit to generate the end result for the client (so we can support screen, tv, handheld, etc., media types as well as themes [we've had customers request this]). I haven't finished it all yet nor have I done any profiling, so YMMV. You can see the current code at http://sourceforge.net/projects/gestinanna/ (the PerlKB project will be worked in to handle documentation -- most of the current stuff in the Gestinanna project handles dynamic content instead of static content). Btw - I am looking at some of the various CMSs for `inspiration', including OpenInteract and Bricolage. I would recommend looking at how they do things if you are wanting to do content management. -- James Smith <[EMAIL PROTECTED]>, 979-862-3725 Texas A&M CIS Operating Systems Group, Unix