The sheer ease of slapping a few random PHP tags into an HTML page and calling it "good" instead of having to actually write a program is definitely a factor, yes. That draws in all the web designers, managers, and other people who want to have a page that does more than just sit there, but don't think of themselves as "programmers".

There are also significant historical issues, though, which may be more significant.

By its very nature, CGI is (relatively) slow, because it needs to fire up a new process to handle each incoming request. Back in The Early Days, Perl and CGI came to be nearly synonymous - an entanglement which persists to this day. (Some job boards don't even have plain "Perl" listings, only "Perl/CGI".)

mod_perl deals with this performance issue, of course, but that opens up a whole other can of worms in shared or managed hosting environments, because installing a new module (such as a mod_perl-based application) traditionally requires editing the apache configuration and you can't let all the end users have that power. So, on most sites, Perl was stuck with using slow CGI.

Then along comes PHP, which is not only mindlessly easy to code for, but it also only requires a single module - mod_php - to be installed and all your users can get the speed benefit of an in-process interpreter instead of having to fire up processes through CGI, without having to give them administrative control over the web server process. It's easy to see why it took off like a rocket.

IMO, if we want to see Perl make a comeback in the web application space, the association of "Perl = CGI = slow" is an even more important problem to overcome than any perceptions about ease of use.


In reply to Re: PHP over perl by dsheroh
in thread PHP over perl by targetsmart

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.