Hi Patrick --

> I gotta have something to counter PHP people with too ;)

Dave is right:  "CPAN" is a very compelling argument.

OTOH, it you've already cast your lot with using a "server page system"
(a la Mason, ASP, JSP, ColdFusion), PHP is a pretty compelling choice.
It's new, sexy, lightweight, more or less capable, and has lots of buzz.

  However:  Another compelling argument in favor of Perl (against PHP)
is an argument in favor of using an controller-based system instead of a
server page system.

A controller-based system (such as CGI::Application or mod_perl
handlers) combined with a true templating system, such as TT or
HTML::Template, makes the templates subservient to the application
logic.

This is the opposite of server page systems which put the template in
change of choosing functionality.  In the latter, an HTTP request goes
to a template which controls execution.  If the template in this system
decides that a different template should be displayed, chaos erupts --
redirect city, snarls of spaghetti code.

In a controller-based system, the HTTP request goes to a controller
which runs the logic and then chooses a template.  This is a more
rational chain of events, allowing the form to *follow* function --
literally.  The controller can naturally choose which template without
having to twist itself in a pretzel to do so.


Add to that the fact that in spite of the claim that it is possible to
separate code from HTML in a server page system, in reality it is too
difficult and nobody does it.


OTOH, if you can't fight the PHP wave, here's an alternative:

  Offer to "prototype" the system in Perl, and migrate it to PHP!

It so happens that a fellow named Tomas Styblo ([EMAIL PROTECTED]) wrote a
version of HTML::Template for PHP:

  http://htmltmpl.sourceforge.net/


This means that you could quickly, and cheaply get a system up and
running with Perl and HTML::Template, and migrate it eventually to PHP.
(If the "prototype" happens to be so good that it takes the wind out of
the sails of migration, so be it.)


TTYL,

-Jesse-


--

  Jesse Erlbaum
  The Erlbaum Group
  [EMAIL PROTECTED]
  Phone: 212-684-6161
  Fax: 212-684-6226



Reply via email to