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!


In reply to mod_perl & TT2 Architecture by tadamec

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.