[web] PHP...insead of ASP?

Started by
2 comments, last by tstrimp 17 years, 7 months ago
Hi, a while back when I first started learning web technologies, I hit the old fork in the road...decide weather to go with PHP or ASP. Since the place I work at already used a bit of ASP, I choose that road, which eventually became ASP.net. So for the last year or two, iv'e been working only in ASP.net (c#), which is nice because I use the same language for my desktop apps as my web apps. But...I always wanna keep my options open and was thinking I should probably learn PHP as well, and it seems that most of the questions dealing with server side programming languages are dealing with PHP and not ASP.NET in this forum. I'm wondering (since i've never used PHP) if there are any big* advantages to PHP (over ASP). It would be nice to hear from someone who uses both technologies. Or is this more of X vs Y thing..like OpenGL vs DirectX...just sorta your preference? Would there ever be a time when I would need to use PHP over ASP? (Assuming I had a choice of server Apache or IIS) Thanks, ArchG
Advertisement
You need to consider there are two different "ASP"s. ASP "classic" and ASP.NET.

For ASP.NET vs PHP, there is no advantage to PHP, period. Even on a LAMP setup you can setup MONO and run ASP.NET pages.

For ASP vs PHP, there are various trade offs, the most notable being that ASP is for almost all practical purposes tied to IIS and Windows.
PHP is better than ASP "classic" in practically every way, unless you happen to be tied to a Microsoft platform where PHP's performance still isn't very reliable in a production environment. And don't listen to Michalson, PHP does have some advantages over ASP.NET.

The main distinction between ASP.net and PHP is one of style. With PHP, you are given a C like scripting language and access to hundreds upon hundreds of open source libraries. It makes it very simple for a C programmer to make the transition to web programming. However, it also means that you have to be more disciplined in your coding if you want the end result to be something other than spaghetti.

ASP.net is, for all practical purposes, focused on developing in a professional manner for the Windows platform. Yes, you could hack and slash some ASP.net application on Linux, but that's not what it's designed for.

The more of a hacker you are, the more you'll like PHP. The more of a "give me an IDE" programmer you are, the more you'll like ASP.net. At the end of the day you can accomplish the same things. Which one you are more productive with depends on you. I would not say that either is better than the other.

If you are curious about PHP, give it a try. You might find yourself on a job some day where you have to use it. But I doubt you'll like it if you are used to ASP.net.
Quote:Original post by Michalson
For ASP.NET vs PHP, there is no advantage to PHP, period. Even on a LAMP setup you can setup MONO and run ASP.NET pages.


In terms of portability, documentation and community PHP beats ASP.net hands down. Very few hosts support MONO. So you will pretty much be limited to a Virtual Private Server or a Dedicated Server.

This topic is closed to new replies.

Advertisement