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:
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.
That sounds like a contradictory statement there - of course the line
will never be 100% clear cut-out... And as for inventing new wheels -
well we're all coders scientists engineers here... That's what we
do!
You can still stick your business logic elsewhere and have that called
by the perl embedded in the templates.
I see where you're coming from, but think about how this will be abused
- coders will get lazy and eventually just embed all the business logic
in the templates. Then your life will be a living hell. As a worst
case scenario you'll end up with (eek!) an inverted Bugzilla! ;-)
With the vast array of options we've got on Perl tools for templating
embedding serving (and other -ings), it seems to me the trend is to
create a whole bunch of new wheels. Then everybody talks about them
the better wheel(s) is pointed out, and then maybe then the wheels are
improved to become uber-wheels while in the background the cycle repeats
itself...
I'd argue that embedding code in your templates is on the way out, and
the sooner it goes the better. I think it was a necessary step away
from embedding templates in your code (eg. cgi scripts), but now it's
time to recognize the aforementioned split revise our models tools
accordingly (and create new ones if necessary).
But then again, this has prolly all been said before. Anyways, that's
my 2c.
--
Steve Purkis [EMAIL PROTECTED] t: +44 (0) 207 614 8600
Unix Developer red | hot | chilli f: +44 (0) 207 614 8601