Choosing The Best Programming Language
A ridiculous number of colleges and universities teach Java as the programming language of choice for the web. Java is a great language, don't get me wrong. But, for the goals, projects, and jobs most of the students will end up in Java isn't even in the running for the programming language to use.
The Problem With Java
I don't like to start by pointing out the flaws with using something. But, sometimes you need to see what's wrong to see why you would look at something else.
Java is great for the corporate environment. Some of the most widely used tools are written in Java and you might not even have know it. But, when you move to the long tail of organizations you'll find that Java is not an option for many medium sized and small business and for non-profits.
The problem is with hosting. Where are you going to host a Java application? Most of the good hosting setups don't provide Java application hosting. They are marketed and targeted at other languages, like Ruby, PHP, and Python. A company could have a staff and department to handle this but, it's usually more cost effective to pay a hosting provider.
On top of the hosting issue, most organizations aren't going to pay to have something written from the ground up. They simply don't have the money. Instead, they will want to use an open source project and extend it. For example, they may want a community site built on Drupal with some extended features or a newspaper site built on django.
Picking A Better Language
If you browser Google for 5 minutes you'll find a number of different approaches to choosing a programming language. My approach is a little different and isn't technical. To pick the best programming language choose the one that helps you meet your goals in the most cost effective manner. By cost I mean not just money but time, resources, and anything else you need to get done what you want to get done.
Some Options
Here is my short list of programming languages for the web to start with:
- PHP - It's the 3rd most popular programming language and first among web languages.
- Python - A more elegant language than PHP with Google support.
- Ruby - If you use Ruby you simple have to use Rails, the framework that made Ruby worth using for the web.
Picking One
Each of these languages has their strengths and weaknesses.
PHP is the most widely available language in hosting environments. The $6 a month cheap web hosting all the way up through the top end hosts support PHP. This is part of the reason many of the most widely used open source web projects are built in PHP. The hosting is everywhere.
Ruby on Rails might be the simplest syntax to learn. It's dead simple to create things in Ruby. But, it's the least widely used among the 3 and there are the least tutorials to learn it. It's strong point is it's simple syntax.
Python is, in my opinion, the most elegant of the 3 languages. Python was written by a computer scientist while PHP was started by an engineer. When you get into the language you'll see the difference.
My Personal Pick And Why
Several years ago I choose PHP as my primary programming language for a few reasons that might be helpful.
- I do a bit of work for non-profits. That means small budgets to do a lot. PHP works on the lowest costing hosting setups and there are more quality open source projects written in PHP than the other languages to cut development costs.
- When I had to learn a web language, PHP was the one with the widest assortment of tutorials to pick up new tips and tricks. While this is still the case, Python and Ruby now have a lot more available.
- I usually work on the projects I work on for a short time. I create it and then hand it off to someone else to maintain. PHP has more developers available to maintain the code for the non-profits.
Notice, my goal was to provide cost effective solutions for non-profits when I picked my language of choice. PHP ended up being that language. If I were going to build a web application with a different purpose I could easily have chosen Ruby or Python. In fact, I have written applications in Python recently when the user changed to me. This is not to say that PHP is bad but, I wanted to see things through the light of a different language.
The Jist
If you're learning web programming and not working in one of the languages listed here pick one of these up. These are the languages the Web is being build on.

Unfortunately you leave out roughly half of the developers out there building on the .NET platform. If you want to strictly stick to the *NIX side of things then sure, your choices above are applicable. Even if the "softies" have an answer (.NET with MONO).
Main point should be, find a language you are comfortable in, has good community/company support and stick with it. I've been doing VB (in its various forms) for more than 10 years and it has treated me very well. In that 10 years I've seen Java, C#, PHP, Python and many others come and some go.
.NET isn't really a language but I get your point. In .NET you use a language like c Sharp. And, for the record I actually like .NET and almost took a job using it not too long ago.
My point is to not so much to find a language you a comfortable with but to find one that cost effectively meets your goals. I've used more than 10 languages in my life and have seen several go, basically, out of use. Many of the languages taught in schools and courses for web development just don't fit well for the base those people are going to work with.
.NET suffers from the same problem as Java for the long tail of customers. There isn't a great amount of hosting for .NET. In my experience with non-profits and other companies, the web hosts they've even considered or already had didn't support .NET. That was one of the things that initially kept me away from it when I first heard the hype for it.
I would, actually, like to seem more .NET hosting at rates the long tail of organizations can afford and for there to be more good .NET projects. Seeing sites like StackOverflow.com built with .NET and MSSQL are a breath of fresh air.
I completely agree - the project/organizations goals and needs should dictate what is used. If not, then it doesn't matter how great the language is used or how great the app looks, it is going to be a never ending pain.
I also say used the the language that best fits the applications needs. We may fight over what is the best (can we say .NET vs open source), but ultimately one must remember that not all languages are equal because not all languages were created with the same goals. They might all be capable of producing HTML, but some do it better than others because that is their main goal. Every language has their strength and weaknesses - the trick is to used the one(s) whose strengths fills the needs of the project.
Some times this may mean mixing languages - use PHP for the core app programming, Java Applets for high user OS interactive tasks (such as file management), and Perl for text-file tings. (Or .NET or ruby, etc).
So use the best languages for the job (yes, you may have to learn something new or use something you don't like).