4 ms·
The effective question is Why did PHP win over Perl for LAMP hosting? Java and .Net might as well have been on another planet. The answer is that mod_php was
by kingkongrevenge 18y ago
The effective question is Why did PHP win over Perl for LAMP hosting? Java and .Net might as well have been on another planet.
The answer is that mod_php was a lot easier for a hosting provider to set up for shared hosting than mod_perl. Still is. The target user for scalable Perl and Python frameworks still seems to be someone with root access.
- mikeryan 18y agoI think that's a bit true but I also have to believe that from a syntax perspective PHP has always been easier to use. That and all the libraries are pretty much built into php. you never had to deal with CPAN - it was either built into PHP's core or you lived without it (generally).
- mechanical_fish 18y agoThe Perl community was too unfocused on the web. Perl was, and is, a general-purpose language built as a replacement for sed, awk, and shell scripts and later retrofitted for the web. PHP was built for one task, which gives it a certain coherency that is a major strength, especially for newbs. You learn to build a web page with embedded PHP on page three of most tutorials. I don't remember the Camel book covering that at all. If it does I didn't notice -- too busy slogging through the regexps and the hash syntax and the insane special characters and the bizarre function-declaration syntax. And I fear that, in Perl, there is no standard way to do it. There are probably 75 standards, which is helpful, but not very helpful. If I visit any random web forum about PHP I am 97% likely to find a discussion of website development; if I visit a random Perl forum I'm just as likely to find sysadmins debating how to automate database backups, or a linguistics debate, or a game of Perl golf.
- kingkongrevenge 18y ago> The Perl community was too unfocused on the web. That's a fairly ridiculous claim. Perl CGI had all the momentum. It had plenty of forums. I repeat: PHP won because as the internet grew and compile-at-run CGI was no longer sufficiently scalable mod_php was more viable than mod_perl or fastcgi.
- mattmaroon 18y agoTotally. As a total newbie, I picked up a Perl book and got frustrated. Then picked up a PHP/MySQL book and built a few websites. The biggest thing for me, at the time, was the ease of use of PHP/MySQL. I haven't touched Perl in nearly a decade, perhaps it got better, but even in 2000-2001 PHP made it very easy for a total newbie to build dynamic websites.