Which Programming Language to Learn – Web Programming
Today we’re going to take a look at the various web programming languages that power the Internet. This is the fourth part in a beginners programming series. In part 1, we learnt the basic of variables and datatypes . In part 2, we moved onto functions and control structures . In part 3, we had a look at some of the numerous software programming languages . Like last time, I’ve included screenshots of what typical code in the language looks like, which I believe is a good at-a-glance indicator of whether you’re going to be comfortable programming it or not.
PHP is the undisputed king of server-side languages in use on the Internet today – running on 75% of all web servers – and is the power behind WordPress, Wikipedia, and even the user-facing part of Facebook.
As a server side language, the code is processed before it reaches the user’s browser, so all they see is the final page and none of the original PHP code. PHP is mainly used in conjunction with MySQL to pull information from a database, manipulate it and present it to the user.
PHP is general-purpose and comes as standard with most web servers – if you’ve ever heard the term MAMP /WAMP /LAMP , the P generally stands for PHP (the rest is Windows/Mac/Linux, Apache, and MySQL).
Another component of standard web server installations, MySQL is a free, open source database server. It’s not a programming language as such, but it is a new language to learn if you want to talk to databases so it’s a key component of modern websites. Although MySQL is actually a command-line language, there are common GUI tools available such as PHPMyAdmin for managing databases more easily.
Again, MySQL is what powers WordPress – so all your posts and content are actually stored inside a MySQL database.
Perl used to be a major force in web programming but has since been relegated to mostly just text-processing applications. It’s incredibly fast at processing text, but not of much use on the modern Internet. It’s something that all hackers have in the box of tricks though, so it’s worth checking out at some point.
To give you an idea of the power of Perl, here’s the complete code that was created to crack DVD encryption. Yes, it is rather cryptic:
Ruby, and its web application framework Ruby On Rails, powers some pretty major websites such as Groupon, Shopify (a commerce platform), and the front-end of Twitter. It’s a full object oriented language that’s interpreted by the server and then sent as a finished HTML page to the browser – much like PHP (yet also completely different, *sigh*). It has a number of key advantages though, namely in rapid development, less code repetition, and speed.
Unfortunately, most web servers do not support Ruby out of the box, so unless you’re able to configure your own server as you wish, you need to use a hosting service such as Heroku.
Python is another full object-oriented high-level strongly-typed language. Adjectives used to describe Python typically include fun, easy to use, and a good learning tool – but ultimately there’s very few real-world Python web applications. It certainly sounds like a good place to start though, especially if you’re the kind of person who’s into Linux and open source / community-driven projects. Just don’t expect to be making any actual webpages with this, and there appears to be a rivalry with the Ruby community.
This is Microsoft’s contribution to the web language arena, predictably popular in corporate environments and nowhere else. It’s closely integrated into the .Net family, and you need specific Windows hosting to run ASP.net web applications, which in my experience is far more effort than it’s worth. Stay away from this one unless you have a really good reason not to.
So, Which Should You Learn?
If you think I’ve missed something, then feedback and reader contributions are always welcome in the comments.
Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.