Saturday, March 17, 2007

For web applications: Perl or PHP?

Theres no correct choice. The choice is yours.

Both are interpreted programs. This means both uses a interpreter to parse each line 1 by 1 and dynamically display it "on the fly".

Choose which ever language that best suits you. Each languages has its advantages and disadvantages. It seems today the popular choice is PHP. The only real experience I had with PHP was hacking up osCommerce. The only real benefit I found is the differences in editing your application. If you only know HTML and wish to learn a language, PHP may appeal to you much more since the HTML is on the same page as the coding. This can make it a bit more easier to follow your application and edit it freely. However, for more technical individuals, Perl may appeal to you because the HTML is usually not part of the scripts. I find this a real advantage. Hacking a well designed and developed PERL script is much easier then hacking a large php application (osCommerce). Thats my small take...and I'm sure both are powerful languages when it comes to building web applications.

Some may then ask.....Which one is more secure?

Again, they're both interpreted languages right? Both can be just as secure as long as you the programmer can make it that way. How secure a web application is depends on how well you know security holes and if you can program your scripts to prevent them. So the answer to this question is neither language is more or less secure then the other since it depends on the programmer.

Now...what about....Isn't PHP faster since its not CGI?

Perl can run just as smooth if you were to install and use mod_perl with Apache to execute your scripts. This allows PERL to be executed directly by Apache, which can then make it just as fast as PHP.

In the end, my Recommendation:
Choose which one best interests you....both are powerful and both can get the job done when it comes to building web applications.





1 comment:

Lovely said...

Hii,
really nice blog with lots of useful information. THanks for sharing, i am keeping my eye on latest updates on your blog. Thanks

Best Regards,
Eliena Andrews
http://healthtreatments.blogspot.com