This is my first post on these boards but I hope it’s taken well. I am looking for advice in terms of what Server Side Scripting language I should take on for my first portfolio website. I have origianlly programmed in Perl/CGI back in the day, and than picked up Java and JSP (in which I have done some work). I skipped the PHP generation and recently entering Barnes&Nobles found dozens and dozens of books on PHP. PHP and MySQL, PHP and Flash, PHP and CGI, and so on. I decided to give PHP a spin and set down to try and write a very simple Calendar program. This is something I have done in many languages and am very familiar with, so it’s something like a HelloWorld for me.
When I set down to start I decided to go straight to a OOP setup as it’s most familiar after comming from Java. Having to refrence the docs which I found a bit inferior to Java’s I began to write the basic structure and hit my first problem. Class/function overloading. It really bothers me that PHP does not assign types to it’s variables on initialization and that made something like this very difficult to do.
$instance1 = new Month(1);
$instance2 = new Month(‘Feb’);
$instance3 = new Month(‘February’);
$instance3 = new Calendar(2006);
$instance4 = new Calendar(‘Feb’, 11, 2006);
The answer I found to this was func_num_args with if/else (or switch statement) basically figuring out the input.
I found that ridiculous, spending 10 lines of code to simply figure out the input is a bit much I think. So being a bit frustrated I came here to ask you (reader) this; should I stick with PHP and join the crowd or should I go with JSP?
Their are also other alternatives like ASP which has the popular ASP.NET
Overall I don’t feel that any language is inferior to another in terms of capability, but I want a language that is fast/secure and that can go into a portfolio.