Advice needed on custom webapp framework

2004-11-17 Thread jonathan vanasco
I built for mod_perl1 a customer webapp framework It functions as 2 perl modules/package sets /lib/WebAppFramework /lib/Website For each website/webapp, i make a new /lib/Website that subclasses the WebAppFramework (which handles users, email, webpage generation, etc -- and makes heavy use of

Re: Advice needed on custom webapp framework

2004-11-17 Thread Michael Schout
On Wed, 17 Nov 2004, jonathan vanasco wrote: Ideally, I would have the packages in Website and WebAppFramework lookup the right DB for the Website There are many ways to solve this problem. I'll show you 2 ways. I'll focus just on the database part to keep this as short as possible, but the

Re: Advice needed on custom webapp framework

2004-11-17 Thread Jonathan Vanasco
Thanks! Right now, I should have been more clear, though -- I'm am kinda doing a bit of each approach you mentioned -- but i am in need of a little more help. I think what i want is more of your second approach right now... Let me elaborate for a moment WebAppFramework::DB.pm Base

Re: Advice needed on custom webapp framework

2004-11-17 Thread Tom Schindl
jonathan vanasco wrote: I built for mod_perl1 a customer webapp framework It functions as 2 perl modules/package sets /lib/WebAppFramework /lib/Website For each website/webapp, i make a new /lib/Website that subclasses the WebAppFramework (which handles users, email, webpage generation, etc --

Re: Advice needed on custom webapp framework

2004-11-17 Thread Jonathan Vanasco
Because i'm an idiot and didn't realize that I was doing that! I'm just used to passing refs everywhere. to get into the whole 'No More passing large vars around' thing, i just stopped passing everything but a ref Silly me! On Nov 17, 2004, at 1:25 PM, Tom Schindl wrote: I don't answer your

Re: Advice needed on custom webapp framework

2004-11-17 Thread Tom Schindl
Jonathan Vanasco wrote: package Website1; my $DB = new Website1::DB(); # make a new ref for the website sub handler { my $r = shift; my $user = new Website::User( \$r, \$DB ); my $page = new Website::Page( \$user , \$DB ); my $html =

Re: Advice needed on custom webapp framework

2004-11-17 Thread Jonathan Vanasco
I'm pretty damn sure you did get that right! That would do EXACTLY what i want it to do! I'm gonna play around with that approach when i get home tonight. Thanks! On Nov 17, 2004, at 2:26 PM, Tom Schindl wrote: What you really need here when talking about Pattern-Programming is a Factory-Class