Thursday, January 8, 2009

C# (.NET) vs PHP

This question has been one that has been asked for many years but no definite answer has been forthcoming.

Very much like which soft drink is best Pepsi or Coca Cola. It’s really about personal taste and what you can get out of it.

There are two major development platforms to choose from. They are PHP and .NET from Microsoft. Then choosing .NET you have a further choice of development languages, being Visual Basic and C#.

PHP has, over the years been a great development platform. One of it's main pro's is that it is open source and free. The costs of ownership and development are minimal. Running on a Linux OS and using mySQL as the back end database and Apache as the web server, all of which are open source, reduced the cost considerably. This was very attractive to students and those who could not afford the set-up prices of other systems.
Many People believe that the open source market is the way to go. They have this unexplained fear or hatred for Microsoft

With php, you are now platform independent, you are not locked into one particular OS

However, don't discount .NET. It is an excellent platform to program in.
.NET is a framework. The major MS languages like VB, C# C++ all use the .NET framework which makes interaction and integration a lot easier.

Over the years the biggest con against MS has been its cost. This has to some degree been addressed. You can now download all the MS express editions (limited versions) free from MS. In fact with the express editions of Visual Studio products you can create quite a range of excellent professional products.

Products include. MS SQLExpress, C# Express, VB Express, WebDev Express.
There is now little difference with hosting providers when it comes to hosting Linux/Windows/PHP/.NET.

Visual Studio Supports a great IDE with Two way tools with great plug-ins available that makes programming a cinch. This is what is commonly termed as RAD. Rapid Application Development. The idea is that you concentrate more on development and design than syntax and coding as such.

PHP does not have a great IDE, none that I am aware of, and none that are considered Two way tools.

Two way tools are in essence, the ability for your Graphical Interface to write the code behind, and also when you write the code behind you graphical interface (IDE) changes as well. Another advantage of .NET is that you can program desktop applications with it as well, your new skills in .NET will not limit you to web programming as such.

Many large companies prefer MS over open source platforms such as PHP. This is because there is a definite face to the Product. Namely, Microsoft. To Many, the Idea of Open source and PHP conjures up images of geeks in a basement with little support or responsibility. If there is a bug in .NET you can phone MS, talk to a person, someone is responsible. To many this is an attractive module, there is security in it, there is history. Sometimes with OneSource you have no idea what you’re getting. For instance there are so many versions of Linux, and you can change the code to create your own version. To many this smacks of lack of control.

However the open source market has evolved to a much more mature model and a lot of these fears have been addressed.

I have used both, but prefer .NET mainly because of its IDE, RAD and Plug-in tools available. Both support a mature security protocol. In essence security is protocol dependent and not language specific. Both are mainly server side execution. You would still use JS for some client side execution. Both have tons of help and tutorials on the net. Both have excellent support for many databases. However .NET is considered by some to be the better choice for lager sites and projects.
So for me, I would recommend MS .NET with C#.

I have put up some MS WebDev Tutorials for beginners on my website if you’re interested.

Let me know what your preferences are. I would be interested to know. Perhaps take the poll.

0 comments:

Website design, web development, web hosting and Search Engine Optimization