On Mon, Jun 18, 2001 at 11:08:06PM +0100, David Cantrell wrote:
> 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:
> > > 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? ;-)
The next few paras. :-)
> 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.
I have done both. I have to say, that ultimately, I think I prefer the
code/data separation, and certainly started looking more at that kind
of thing, having had to maintain templates I once wrote which were mixed.
Those templates only had calls into modules elsewhere, so the main code
was in modules, but it's the same argument, ultimately as accessor methods
> You can still stick your business logic elsewhere and have that called
> by the perl embedded in the templates.
Exactly what we did. It still ended up being unmaintainable.
> > 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 :-)
I think the smiley indicates the point of this. :-) And there, you use
things like stored procedures which go a long way towards that separation.
Matthew Byng-Maddick <[EMAIL PROTECTED]> http://colondot.net/