tadamec has asked for the wisdom of the Perl Monks concerning the following question:
Greetings, Monks!
I have a question regarding the architecture of web applications, particularly under mod_perl using the Template Toolkit.
In the past, applications I've worked on have ended up a jumble of application and presentation logic. I'd like to avoid the trap this time. I was wondering if I could get some input from the rest of you out there who've worked with this combination for effective design strategies.
I've been tasked to come up with an administration area for an "E-Business" and, possibly, redo their entire front end and shopping cart. The current application is written in ASP and is a nightmare of embedded HTML and sometimes-global sometimes-local variables. Making a minor tweak sometimes takes a week or two.
In order to make the site easily expandable, and keep related business logic together, I thought I'd make a generalized Apache handler to take care of sessions and user authentication, and then come up with some sort of dispatching scheme to will map URLs to Perl modules and methods. For example, "http://www.example.com/login" would be handled by the generalized Apache handler, and methods like "http://www.example.com/foo/bar" would be handled by a call to Foo->bar().
Before I commit to this radical change, I'd like to know if anybody has done something similar and, if so, how well did it work out for you? Is there a better method? Am I entirely off base?
Thanks for you input!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: mod_perl & TT2 Architecture
by perrin (Chancellor) on May 25, 2004 at 00:40 UTC | |
|
Re: mod_perl & TT2 Architecture
by lachoy (Parson) on May 25, 2004 at 00:12 UTC | |
|
Re: mod_perl & TT2 Architecture
by dragonchild (Archbishop) on May 25, 2004 at 01:40 UTC | |
|
Re: mod_perl & TT2 Architecture
by EvdB (Deacon) on May 25, 2004 at 07:45 UTC | |
by perrin (Chancellor) on May 25, 2004 at 16:51 UTC | |
by EvdB (Deacon) on May 25, 2004 at 17:22 UTC | |
by perrin (Chancellor) on May 25, 2004 at 17:44 UTC | |
by EvdB (Deacon) on May 26, 2004 at 07:51 UTC | |
|
Re: mod_perl & TT2 Architecture
by tadamec (Beadle) on May 25, 2004 at 04:46 UTC | |
|
Re: mod_perl & TT2 Architecture
by tilly (Archbishop) on May 25, 2004 at 18:55 UTC |