On Mon, Jun 18, 2001 at 08:24:13PM +0100, Matthew Byng-Maddick wrote:
> On Mon, Jun 18, 2001 at 07:54:36PM +0100, David Cantrell wrote:
> > On Mon, Jun 18, 2001 at 04:46:25PM +0100, Leo Lapworth wrote:
> > > I'd also like to mention HTML::Mason - Euuu, No, no and thrice no!
> > > (ok, has some nice 'bits' but NO!!!! - thou shalt not put thy
> > > HTML and thy Perl in the same file).
> > It is NOT POSSIBLE to completely divorce presentation/application.
> > So you end up with all sorts of languages made up to be mixed in with
> > the presentation - like PHP and the mini-language of TT.  Why are
> > those OK (I'm thinking specifically of TT - we all know PHP sucks for
> > other reasons) but plain ol' perl isn't?
> 
> Ohmigod, I'm agreeing with Cantrell on something!!

What am I doing wrong? ;-)

Seriously, I agree 100% that you should strive to seperate application
from your presentation as much as possible, but seeing that you can not
do this entirely, you may as well embed perl in your HTML and save
yourself the trouble of inventing a whole new wheel.

You can still stick your business logic elsewhere and have that called
by the perl embedded in the templates.

> Despite having written an embedded perl templating system, I'm now very
> much in favour of one where the tags are just delimiters as far as possible.
> Thus I think things like HTML::Template are actually better than TT2,
> precisely because the toy language in TT2 is just as bad as embedding code.
> 
> See my point about SQL, as it's related to this.

Think of SQL as being a cross-language extension to the 'host' language
and you'll feel much better about it :-)

-- 
David Cantrell | [EMAIL PROTECTED] | http://www.cantrell.org.uk/david/

      Good advice is always certain to be ignored,
      but that's no reason not to give it            -- Agatha Christie

Reply via email to