Geekpedia Forums Logo

PHP or ASP.NET

by Jerry Carlin on Friday, February 10th - 10:09 AM



I didn't name this topic "PHP vs. ASP.NET" because it sounded too much of a cliche.

Anyhow, I'm interested in what you guys think. What are the advantages of ASP.NET over PHP and viceversa. I'm sure both have advantages & disadvantages.

I'm glad you asked this question.

I work with both PHP & MySQL and ASP.NET & SQL Server. The first one to learn was PHP & MySQL, because at the time ASP.NET didn't even exist, there was only ASP.

ASP.NET and SQL Server is better for large websites, websites storing sensitive information, corporate websites and many similar web applications. Why? Because ASP.NET is faster than any other web programming language, it's easier to maintain the code when it comes to large websites, thanks to code-behind (and no, Smarty is not even close to code-behind). And I sometimes find big portions of code that I can reuse in my Windows applications without any changes, or very little.
Also, you have the freedom of choosing from multiple languages; so you can code ASP.NET using C#, VB.NET, C++, etc.
SQL Server is also very fast and secure (thanks to stored procedures), and it can store extremely large amounts of data; in fact there is no limit; you can have millions of rows in a table.
Windows 2003 Server is also more secure and stable than Linux (in spite of the contrary belief, that may have been valid for Windows 2000).

But when I code a small website, when I need to get the thing done fast and there's no big project involved (and I know it won't become big in the near future), I like to use PHP & MySQL. For small websites I don't want to bother with stored procedures or code behind. Also, hosting is cheaper for PHP & MySQL.

So why is this site built using PHP & MySQL? Because I didn't have the time to rewrite it in ASP.NET 2.0 and SQL Server 2005

And what allows me to use both the PHP & MySQL combination and ASP.NET & SQL Server is IIS running on Windows. Thanks to IIS, I don't have to bother with running two operating systems, because if I'd run Linux, I wouldn't be able to use ASP.NET 2.0 and SQL Server on my server. And I don't find Linux very friendly either.

Both of them are appropriate for different types of websites, so use the right tool for the job.

Furthermore, ASP.NET developers are paid better and you're more likely to starting developing Windows apps. and get paid even more.

"Furthermore, ASP.NET developers are paid better"

Yes, cause they take longer to make the same app :) rofl

I think this is a very sensitive topic on who you speak to. If you speak to a .net developer they will say .net and if you speak to a php developer they will say php.

Personally i prefer php for websites, probably because ive been doing php alot longer than .net and yes i have found .Net developers do get paid alot more than php developers.

But php has advanced alot from php 3/4 to 5 with it moving more towards objects. I think if you design your application correctly using or the latest features that php can be just as easier to manage than .net in a large application and zend is pushing php in the right direction. The problem with php at the current time that i have found in the industry is that alot of senior developers come from a php 3 background and still want to do things the old way (procedural) where all the new programmers coming through have learnt to use objects.

I think its now becoming down to a user choice and the gap will tighten even more over the next 3-5 years. Personally i think its a good idea to learn both, because the more languages you learn the better and the more you will get paid :)

PHP is an easier language to learn; but .Net has alot of advanced features you will have to use straight up, therefor harder to learn.

my 2 cents anyway.

PHP is certainly a better soultion because its cheap and easy on the other hand microsoft .net is too complex for new developers.