I'm about to embark on a project that will need to:
The website will be subject to short periods of very heavy loads to pages (300+ visitors a minute for several minutes), but most of the time will be idle (a dozen or so visitors a minute).
I have a very strong background in Java and web services, but I do not want to use Java for this project as I'd like to diversify my skill set.
I'm not looking for your opinion on which language you think is best. What are some pros and cons from using these languages that you might recognize from your own experiences?
And the winner is... Both PHP and Perl are excellent languages, with a rich history and excellent community support. But PHP is often the go-to language of the two, being used by over 78% of websites with a known server-side programming language for good reason.
Why it is still relevant in 2022. Perl is not going away even if it tends to be less trendy than other modern languages. It is used in production codebases of many companies, for tasks as diverse as web development, databases access, log analysis or web crawling. It is a core component of most unix-like systems.
PHP is generally considered to be faster than Perl, although this is debatable. In any case there are certainly ways to make Perl perform as fast. PHP supporters often cite speed as a good reason to choose PHP, but in reality it is not normally a concern and any differences are usually academic.
Perl is an object-oriented, useful, Multi-paradigm, intelligent, procedural, basic and event-driven programming dialect. PHP is a Basic, intelligent, object-oriented, utilitarian and procedural programming dialect. It was authorized beneath Imaginative Permit GNU Common Open Permit.
I'd go with Perl. The LibXML series of modules gives a variety of interfaces (DOM, XPath, XSLT, etc.) backed by a fast C parser.
Perl's regex support for slicing and dicing text is pretty much unmatched by any other language. If you expect to do lots of arbitrary text processing, and are at least a little familiar with regex, you will thank yourself.
There are also a series of great web frameworks for Perl, including the simple but powerful Mojolicious framework, and the comprehensive Catalyst framework. There's always the ancient and stable CGI library, but Mojolicious or Catalyst would probably be better choices.
Since I'm a PHP guy, here is what I can offer about PHP
So the requirements to a language from your question are met by PHP.
However, Perl, Python or Ruby or even ServerSide JavaScript (...) should all be capable of doing what you are asking for either. PHP has it's quirks, so do the other languages. If you are a Java Guy, you might like Ruby for it's syntax, but then again, only you can decide.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With