On Wed, 2005-02-09 at 11:26 -0500, Jonathan Vanasco wrote: > could someone who has worked w/mod perl longer than I have give me some > feedback on this approach to webapps i've been using lately: > > • the modperl handler creates a 'user' of the web app based on the > apache request > the 'user' handles all the session management, login, etc > my $user = new myApp::User( $r ); > • the handler then creates a 'page' of the webapp as such > my $page = new myApp::Page( $user ); > then calls it to render > my $outputHTML = $page->render() > > the myApp::Page is a perl mod that pulls the request info off of the > user object, and correlates that to the user profile > > everything is a perlmod that is pre-compiled. subclasses of > myApp::Page are the page content areas > > It sounds crazy, and probably is.
It's impossible to say, based on such a short description. What I can say is that using a design like MVC that separates the presentation from the functionality is pretty useful, and I often use inheritance in controllers. I also use inheritance in presentation, usually by taking advantage of whatever include path features the templating system I'm using supports. - Perrin