Monday 10 August 2009

PHP and the demise of ASP Classic

Coding with PHP and the demise of ASP Classic

I have just started dabbling my toes in the water with PHP and MySQL primarily because I have just created a new blog with wordpress. I have always been on the Microsoft side of the development world starting off with Macros and VBA coding, Access databases, SQL 6.5 through to 2005 and then when the Interweb was created by Al Gore in the 90's :) I started using ASP classic, Javascript and then C#, ASP.NET.

All the companies I have worked for have used Microsoft server technology and developed primarily in MS technologies. Other languages have been used including Delphi, Perl and Java but my core experience has been Microsoft for good or bad.

One thing I am surprised at though is how PHP which is a server side scripting language is still flourishing whilst ASP classic has really died a slow death. Obviously there are still lots of sites including large ones that I have developed still running on ASP classic but any new development would be carried out in .NET. I can see how much more flexible PHP is as a scripting language but apart from some better OO characteristics its still script. I am therefore wondering why Javascript used server side didn't take off as the primary language for coding ASP classic.

VBScript has so many downsides such as its Error handling, its useless memory intensive regular expression engine and the only object orientated aspect is encapsulation. Therefore with Javascript having better solutions for all these 3 and coders being familiar with it anyway through using it for client side scripting its a shame that more coders didn't take up the Javascript mantle when they could. Creating development sites on home PCs or any laptop with an MS OS is as easy as putting a .ASP file in your inetpub/wwwroot folder and running it from your browser.

There are new forms of serverside Javascript coding about including Jaxer and Rhino which as I understand it converts the Javascript into Java so it seems to be carrying on in different forms.

As for the PHP I am just getting used to some of the odd syntax such as -> and concatenation using periods but it seems pretty similar to ASP classic in that its loosely typed language and can appear very messy in places when the HTML is mixed with the code. However it has more inbuilt functionality and is a nicer language as I much prefer Java or C# like syntax when coding.

No comments: