Topic: Which programming language should I learn

I 'm getting ready to enroll into a web programming class. Which would be more practical, ASP.NET or PHP/MySQL ?

I read on one of the older posts saying that ASP is outdated and expensive to host. I also read that PHP is really easy to learn, and that I would need my host provider to support PHP site.

Thanks for your help

Re: Which programming language should I learn

Given the choice between ASP.NET and PHP, I would suggest going with PHP.

It has a wide user base, and there are a lot of tutorials (look at killerphp.com and phpvideotutorials.com) and you should be able to get help if you need it. I've found it pretty easy to learn, though it takes practice. ASP.NET is a bit more expensive to host, though it isn't necessarily outdated (if you learn ASP, learn ASP.NET, rather than the older ASP.)

Re: Which programming language should I learn

It really depends on your goals as a developer.  What do you want to do? Get a job in a corporation, freelance, web entrepreneur? 

You can do more with PHP and tap into your (code) creativity with PHP. Also, freeleance jobs and almost all open source scripts use PHP.

But, asp.net might have more corporate appeal if that is what you want.  I would stress learning C# because there are still jobs for that. And everything you can learn about JavaScript, especially 'AJAX' and JS libraries like jQuery, because as the web matures, interactive web services will become favored over desktop applications.

Re: Which programming language should I learn

Thanks for your feeddback. I going to play with PHP for now. It does look easy to learn.

Re: Which programming language should I learn

Much as Shelf answered, it depends on your goals.

Legacy ASP (it is a technology, not a language, it actually uses Visual basic as the language for it) is on it's way out.

ASP.NET is in and growing. If you want to work for a company or corporation or Sate... any large employee, it is the way to go. Again though it is just a Framework, a technology. It can use many languages but most common is C#. I would disagree that there is "Still work for C#". C# was created for ASP.NET, it is a new language and the most common for ASP.NET. However ASP can use PHP, Python etc. as well as Visual basic.

PHP is best for any freelance, small company use. But there is also Perl and Python.

If you want to make money and travel... COBOL is still in demand with Banking institutions and many places like Dubai and other Arab states in the oil belt.

If you want to get into the more ecommerce and media type sites, FLEX and ActionScript will be a good bet.

There are different tools for different jobs.

Re: Which programming language should I learn

All the answers above are good - however my piece of slightly pedantic advice would be:

Don't learn a programming language - learn how to program!

This might sound abstract (or even plain daft! How do you learn to program without learning a programming language?!)

You should try to learn best practices in programming - OOP, design patterns, a little bit of computer science - and apply it to whatever language you're working in at the moment. Changing languages is easy, once you understand the concepts.

For that reason, I would recommend learning Python. It has a multitude of uses, including web, and it gets in the way least when you're learning to code.

If you learn PHP first, you'll learn all of PHP's crazy syntax, rules, and concepts and it will hamstring your development. For example, PHP does nothing to encourage you to separate business logic from presentation logic.

So honestly, my recommendation is that you learn to code in any language except PHP - C#, Python, Ruby...whatever.

(NB - my day job is a web developer working primarily with PHP!)

Re: Which programming language should I learn

LOL - I have to agree, my first language was Python! I am a Programmer and have learned many languages and all of them I remember thinking, "OH Yea! I remember that from Python!"

Not that it is a Python thing... but the concepts are the same for all, variables and globals and OOP and business logic etc., so once you understand programming they may have different syntax, but the logic behind them is all the same. Once you learn one, the other languages are generally easier... except Java... i still hate it.   big_smile

Re: Which programming language should I learn

Ah, Java, now there's a different kettle of bananas!

Java:

import java.net.*;
import java.io.*;

public class JGet {
    public static void main (String[] args) throws IOException {
        try {
            URL url = new URL("http://www.google.com");

            BufferedReader in = 
                new BufferedReader(new InputStreamReader(url.openStream()));
            String str;

            while ((str = in.readLine()) != null) {
                System.out.println(str);
            }

            in.close();
        } 
        catch (MalformedURLException e) {} 
        catch (IOException e) {}
    }
}

Python:

import urllib
print urllib.urlopen('http://www.google.com').read()

Originally seen here.

Re: Which programming language should I learn

I originally started with Basic, then Visual Basic, and then Java in high school (though, don't ask me to remember much of those three languages). I agree that it is important to learn the basics of computer science itself -- best practices, OOP, design patterns etc. One of the reasons why I want to minor in Computer Science, just to pick that stuff up...