ASP.net vs PHP
ASP.net or PHP?
This is a question often faced by web applications developers, since the web is growing and growing at a steady pace, so are the frameworks and technologies that support it. The two most common and well established server side technologies are ASP.NET and PHP. And still, many other technologies are appearing on the scene, like Ruby On Rails, increasing the myriad of programming languages to choose from.
The answer to the question to determine whether a programming language is better than any other one is simple: It depends. It depends as much as buying a Ferrari would take you faster, but at the same time will ruin your finances when it comes to fuel, so is it really a Ferrari better than a Corsa? Well, it depends.
Many commercial systems on production nowadays are written on what is known as LAMP: Linux, Apache, MySQL, PHP. They have the obvious asset to be free open source software, which brings many advantages. Not only the cost of deploying the whole site is negligible, due to the use of GNU license, but also because having a whole legion of developers enhancing the framework makes it more robust –perhaps more fragmented as well though- and up to date. Many are the companies that choose this cost effective model over other private owned models.
PHP is an interpreted language, this is probably the biggest feature to take into consideration. In layman terms, an interpreted language is a language that gets “interpreted” or translated into machine language at execution time. This is great for portability purposes, since the code can be executed in pretty much every operative system in the market. The main drawback is performance, a piece of code that has not been translated yet, will be slower to run that the one that has, since the interpretation process includes an overhead.
On the other hand ASP.NET gets translated into machine language after compiling, that means that the execution of your code will be faster since the interpretation overhead is gone, but this means as well that only Windows machines would be able to run the code. That’s right, the whole .Net Framework is owned by Microsoft, which also means that you must need to buy a license to develop on it. ASP.NET, I must say it’s not even the same thing as PHP, PHP is a language. ASP.NET is a framework. The learning curve for ASP.NET could be pretty steep, if you don’t come from an IT background. .Net utilizes the Object Oriented Programming paradigm, which is extremely powerful, but at the same time, not easy to grasp at first. My personal advice on this topic is, if you really want to get a career in web programming, at some point you will need to use Object Oriented Programming, so get your hands dirty asap!
Most commercial applications nowadays are written using Object Oriented Programming, so learning this paradigm would give you a big boost in your career. Dot Net is a framework, and thus, it will run out of steam slower than PHP, but using one or another really depends on your choice, and what your developers feel more comfortable with.