[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modperl
Subject:    Re: comparison of html/perl methodologies
From:       Andrew Ho <andrew () tellme ! com>
Date:       2000-12-31 21:57:58
[Download RAW message or body]

Hello,

PP>Now, I'm interested in looking at web authoring from the reverse
PP>perspective - embedding Perl in html.
PP>
PP>A quick look tells me that there are a number of possibilities out there --
PP>Apache ASP
PP>Mason
PP>Embperl
PP>HTML::Template

HTML::Template is not an embedded Perl solution per se, but rather a
templating system. It's a rather fine line but the crux of it is that
rather than embedding Perl code in non-Perl text per se, it's Perl that
interprets non-Perl text in a special way.

In contrast Apache::ASP, Mason, and Embperl are all full-fledged embedded
Perl implementations. I would say that the embedded Perl implementations
are better for data-driven pages (e.g. there is more non-Perl text (HTML
or XML or whatever) than Perl code), whereas the template systems (other
ones include homegrown variable substitution and Text::Template) are
better for pages where there is more Perl code than output.

An example of the former (data-driven) might be a website that displays
and lets you manage a stock portfolio--most of it stays the same except
for some dynamic data parts. An example of the latter could be an HTTP
data server that returns XML.

Generally, it's easier to transition from a pure CGI based system to a
templatized system rather than an embedded Perl system, because a template
system basically centralizes all your print() statements into a template
fill-in call. However, I think the embedded Perl syntax gives a more
powerful separation of code and presentation.

One advantage of Apache::ASP is that its syntax (<% code %>, <%= expr %>,
etc.) and semantics are very well known, so this is great for working with
coders who may have had some exposure to ASP in the past.

Humbly,

Andrew

----------------------------------------------------------------------
Andrew Ho               http://www.tellme.com/       andrew@tellme.com
Engineer                   info@tellme.com          Voice 650-930-9062
Tellme Networks, Inc.       1-800-555-TELL            Fax 650-930-9101
----------------------------------------------------------------------

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic