On Thu, 27 Jul 2000, Darko Krizic wrote:
> > > Newly I did something with Enhydra (Java Servlets) and they
> > have a pretty
> > > neat templating system: They use standard HTML and one uses the "id"
> > > attribute in HTML tags to access them and manipulate
> > values/contents.
> > > [...]
> > > Does anybody know something similar for Perl?
> >
> > No, but I was thinking of incorporating enhydra's XMLC technology into
> > AxKit. I'm not sure its a better method of working than XSLT or
> > XPathScript though, which allows you to be future looking (always
> > XML). But it could be kinda neat to do. Should be almost trivial with
> > HTML::Parser to generate perl out of that. Providing of
> > course they don't
> > have some stupid patent on it (doubtful since its GPL'd).
> >
> > Can you wait, or do you need something now?
>
> As you know projects must be finished until yesterday. It would be a dream
> if we could share the templates between Enhydra and Perl. The only problem I
> see here is the performance. Enhydra compiles the java and the HTML pages
> and creates methods and a DOM model. Doing this on the fly (for mod_perl)
> would be a big drawback in performance. Maybe there should be some kind of
> precompiling.
>
> How long do you think would this last? I could wait for about 3 hours or so
> ;-)
Well... longer than that. But even if I wrote something this afternoon -
you still wouldn't learn it very quickly.
> The problem with many templating systems is the fact that they invent a new
> language like "<td>$variable</td>" which is usually not displayable in the
> Browser so that the designer and the programmer must work tightly.
Thats a problem with _all_ template systems, including XMLC. With XMLC's
method you still have problems with bits that get conditionally
included. Sure, looping rows of tables look good, but wait until you start
using XMLC a lot. Then you'll find the flaws.
Better to start with a standard that you can build on, like XSLT, IMHO.
> What other templating systems do exists that are usefull?
Thats a huge question, here's a few:
EmbPerl
Template Toolkit
Apache::ASP
HTML::Template
XSLT
XPathScript (part of AxKit, which can also do XSLT)
Mason
I've probably offended some people by ommiting some :-)
--
<Matt/>
Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org | AxKit: http://axkit.org