Fred
03-08-2002, 10:46 PM
Is Perl the main programming language for Internet Web Sites?
![]() | View Full Version : Is Perl the main programming language for Internet Web Sites? Fred 03-08-2002, 10:46 PM Is Perl the main programming language for Internet Web Sites? YUPAPA 03-08-2002, 10:47 PM No roly 03-08-2002, 10:50 PM No 'coz it puts a lot of load on the servers CPU (Perl is executed into memory each tie a page is opned). PHP is da best avara 03-08-2002, 10:55 PM Not too long ago, I would have voted yes. But right now, PHP is really taking over. The main advantage of PHP is how easy it is. You can pretty much sit anybody down with a PHP book for a couple of hours, and next thing you know they'll have written a simple shopping cart. ;) kmb999 03-08-2002, 10:55 PM IMHO, in their current states, PHP = web sites & Perl = everything else. allan 03-08-2002, 11:11 PM Originally posted by roly No 'coz it puts a lot of load on the servers CPU (Perl is executed into memory each tie a page is opned). PHP is da best Only badly written Perl programs use excessive CPU time. A Perl program can run just as efficiently as a PHP script, and Perl is much more powerful than PHP. That being said, according the latest survey by Netcraft (http://www.netcraft.com/survey/) PHP is more popular for basic CGI scripting. ck74 03-08-2002, 11:21 PM Simply php programming is easier then perl programming and takes less time. That's why php is popular. CK Jedito 03-08-2002, 11:58 PM jsp/servlets its getting more addicts everyday :) Lawrence 03-09-2002, 12:16 AM Perl shouldn't use any more resources than PHP. What does use more resources is CGI. For both Perl and PHP, you can run them as CGI or with an Apache module, the latter being more efficient. Most hosts run Perl as CGI, but PHP with mod_php. This means that Perl scripts become resource intensive, whereas PHP scripts do not. If you were to run both mod_perl and mod_php, while I don't have benchmarks on hand, I suspect that you would notice very little difference. Instead of saying "Perl uses more resources than PHP", you should be saying "CGI uses more resources than mod_perl or mod_php". Switch around to using mod_perl for Perl and CGI for PHP, and guess what happens? hotice007 03-09-2002, 12:21 AM I'm an ASP programmer myself, but really interested in learning PHP as well. Anyone here know which is harder on the learning curve? I know ASP took me a good whole year to get a hang of it. Oh, and anyone knows a good tutorial site that is not lengthy to get a quick start on PHP? tae4 03-09-2002, 01:15 AM Well, I've done ASP and a little PHP but I've got to say Microsoft's new ASP.NET blows both of them away. Simply incredible and much more powerful!!! 21inchguns 03-09-2002, 01:22 AM To answer Fred's question: NO I gotta say though i am a big fan of Cold Fusion.......I really love it.......but have recently been getting into PHP........ hotice, you could have a look at webmonkey.com, they have some PHP stuff which is pretty good to start out with.......... vselvara 03-09-2002, 12:37 PM If you are looking for speed and reliablilty go with JSP and Servlets. Java is very nice to program and not cryptic like perl. WebBloom 03-09-2002, 02:01 PM I have programmed for many years in PHP, Perl, JSP, and even a little Cold Fusion and I must say that I love PHP. It is not necessarily the most powerful of the languages but it makes programming enjoyable again. It is both extremely easy to learn and very intuitive and easy to read. It seems to have taken all of the great string functionality from Perl and simplified all of the rest. Also, it has the benefit of allowing you to completely split the programming from the design and have a web design team that actually works and is efficient. If you haven't used PHP, I would definitely recommend that you give it a try. I hope this helps. David Delisle cperciva 03-09-2002, 04:04 PM Personally, I still use C whenever possible. Tim Greer 03-09-2002, 09:30 PM I agree with what a previous poster stated. Perl and CGI are not the same thing. Perl and CGI is not any different than comparing PHP and CGI. CGI is an interface, not a language. You can use C, C++, Perl, VB, Python, and many other things to run as CGI, even PHP. Either one can run as CGI or as an Apache module (i.e., mod_perl, fastcgi, etc.) In fact, you can write Apache modules in Perl. Perl is more of a language, while PHP is more like an interface. Perl is more powerful, but PHP seems to be easier for most people. If you want _really_ fast load times and ease, check out this thing called "HTML" -- it's WAY faster loading than PHP and easier too (and more popular). The question is, how useful? Heh. I you can, learn C and use that, write Apache modules in C. If you can't, try Perl. If you can't, try PHP. If you can't, try HTML (and graphics) and be a webmaster instead, because you're not apt to programming. Remember though, PHP is not built to be a replacement for a langauge altogether and it's design makes it far more insecure and buggy than Perl or any real language. The reasons are obvious. With Perl, C, etc., you can create the application and interface -- with PHP, you are stuck with theirs and it's problems -- you don't create full functions, you use the one's PHP offers. Anyway, it depends on what you do -- when in doubt, check out documentation and don't trust information that's a result of what people debate about on web forums. ScottD 03-09-2002, 09:46 PM I'll add briefly that in almost any case you'll be executing C code at some level. Even compiled Perl is Perl code translated to C and then compiled (unless that has changed) so C will almost always be the fastest raw code. The difference really lies in the available API's, for example I know for a fact that I would not even attempt to build a regular expression parser that compares to that of Perls. I am a believer that for back end code, C++ is the way to go and for front end stuff it's XML/XSLT. I'd rather use SOAP than CGI. cperciva 03-09-2002, 09:55 PM Originally posted by DizixCom I know for a fact that I would not even attempt to build a regular expression parser that compares to that of Perls. Evidently you managed to avoid my "Introduction to Formal Languages" instructor. Lucky you. Walter 03-10-2002, 02:41 AM Originally posted by Tim_Greer I you can, learn C and use that, write Apache modules in C. If you can't, try Perl. If you can't, try PHP. If you can't, try HTML (and graphics) and be a webmaster instead, because you're not apt to programming. If you can't, try HTML. If you can't, try Frontpage. :stickout ho247 03-10-2002, 05:25 AM I've been programming for 3 years now and I've used Perl and PHP. I've noticed a big speed difference with both of them. fors the first year, Perl was the main language I was using. But when I got started with PHP with more scripts, I decided to port all my Perl scripts to PHP and all the scripts loaded much faster, it also reduced my server load dramatically. That's why I only code with PHP/MySQL now. Alan Tim Greer 03-10-2002, 12:20 PM Originally posted by ho247 I've been programming for 3 years now and I've used Perl and PHP. I've noticed a big speed difference with both of them. fors the first year, Perl was the main language I was using. But when I got started with PHP with more scripts, I decided to port all my Perl scripts to PHP and all the scripts loaded much faster, it also reduced my server load dramatically. That's why I only code with PHP/MySQL now. Alan Again, someone is comparing CGI with PHP, not Perl with PHP. Check out mod_perl or FastCGI and you'll be able to run Perl, C, C++, etc. just as fast (or faster) than PHP, if it's a speed/efficiency issue. CGI has overhead, not Perl, not C, etc. Perl also offers easy interactions with a variety of databases, including MySQL. Hmmm, 'efficiency' -- so much for I before E, except after C. Now I'm all upset... priyadi 03-10-2002, 01:01 PM Actually, when comparing run time speed between perl and php, perl is much faster. Perl compiles its code to native code, while php interprets code line by line and execute it. |