I got into this discussion with a student at school this morning. A professor wants to convert my proposed CS site from PHP to straight ASP. I don’t understand why, for a number of reasons, why he would want to or even put himself through that. All OS preferences and biases aside, I argue that PHP is better than ASP/ASP.NET for one major reason. Let me show you visually. I am a visual person, and can comprehend things when explained visually much better.

Do you see it? Look harder. No? How about now?

Apparently you don’t see it, so I’ll show you even a closer view.

That’s right. The character that the browser uses to recognize PHP code from regular HTML code is the ‘?’ which happens to conveniently sit right next to the SGML characters as well as the shift button used for all three. What character does ASP/ASP.NET use? Oh, that’s right- it’s the modulus character ‘%’ which sits halfway across the keyboard. Lazy? Better believe it! Please tell me of a coder who isn’t. Please provide me the name of a programming software distributor/company who isn’t. Programming is all about convenience.
That reminds me. Doesn’t Microsoft, the Great Company who provided us with the convenience of ASP/ASP.NET, give us the ‘\’ when navigating through the OS? Yup. UNIX/Linux/Mac/Every-other-non-IBM-or-MS-OS uses the ‘/’ which conveniently sits next to ‘.’ on the keyboard.
This is why PHP is superior to ASP/ASP.NET and why UNIX/Linux/Mac/Every-other-non-IBM-or-MS-OS is superior to Windows.

{ 26 } Comments
As a user of both PHP and ASP.NET there are good and bad things about both and it mostly comes down to preference and which one you are comfortable with. At work I use C#/asp.net extensively and for an outside project I am using PHP. One thing worth mentioning though is there a BIG difference between asp and asp.net. DO NOT use asp. It’s terrible.
I totally agree that .NET is hands and foot better than straight ASP. And no doubt, you develop with what you are comfortable with. This post was mainly just satire.
Seriously, I left .NET for one major reason: overhead. It eats up easily triple the memory that PHP consumes. There are other reasons, however, .NET has it’s place. It just doesn’t work well for me. I do love the C# language, however. Coming from Java, that language just made sense, and I spend a great deal of time using Mono on RedHat at work. Thank you Miguel!
PHP is for websites. ASP.NET is for applications. From your comments, the following is obvious:
1. You don’t know much about ASP.NET and the .NET Framework.
2. You have never written a business application (note the word ‘application’) in the professional world. I am not talking about something that does some simple tasks, I am talking about real applications that deal with massive quantities of _real_ data coming from different sources in different formats, etc. Writing a website for school, you will never know the differences between the two.
3. You don’t understand what you are getting in return for the amount of memory consumed by ASP.NET applications. Also, you don’t know much about configuring an ASP.NET application. This goes back to item #1.
Apparently, you don’t know anything about me. I spend a great deal of my professional time developing server-side applications. The website for school is completely voluntary. The data and applications we build range from data processing and sample manipulation to text cleanup. We don’t use .NET at work. We use PHP. the learning curve and training for .NET was just too great. As far as your claims are concerned:
1. I know a great deal about ASP.NET and the .NET framework. Who are you anyway to make such claims about me from a satirical post? Do you not understand what a joke is?
2. As mentioned above, I spend a great deal of time developing professional applications. About 40-50 hours / week. It’s my job. Python, PHP, CfMC and many more. .NET is not one of them
3. You’re right. I don’t understand what I am getting in return for my investment in developing .NET apps. I never have. Why should I have to build an application and configure a framework?
I hope you aren’t a programmer or software developer. If you were, I would be concerned as a company hiring you.
In responce to item 5.
If you used .NET instead of PHP etc you would only need to work 1 day a week. As .NET is about 4-5 times faster to develop in than PHP etc. This increases with the complexity of the site you are developing. The only time PHP is as quick to use as .NET is when there is hardly any code needed!!!
It makes me laugh how there is a 100% correlation between what OS/browser you use and which language you develop in (myself included). There are simply millions of Microsoft haters out there who would rather boil in oil than admit that .NET is faster, easier and more powerful than PHP! see:
http://www.promoteware.com/Module/Article/ArticleView.aspx?id=10
John-
“Boil in oil”, eh? Are you serious? LOL. I have personally benchmarked ASP, PHP, JSP and .NET. PHP was 10% faster than JSP, 30% faster than ASP and almost 230% faster than .NET.
The great thing? I didn’t have to install everything and the kitchen sink for my operating system. Minimal Debian base install, Apache2 and PHP. No extra software. No GUI.
For Windows, not only is IIS slower than your grandma, it’s security holes and complexity behind making simple system calls are a nightmare. *PLUS*, I have the entire desktop GUI slowing me down, not to mention the overhead of Active Directory. Faster? Yeah, right!
As far as your comment working only 1 day a week, apparently, you don’t do web development. Developing for your beloved browser “IE” is a pain, regardless of language or platform. If I didn’t have to develop for IE, then I would in fact be working only 1 day a week.
I don’t understand one thing. People who claim that .NET should be used to develop applications and PHP should be used to make only websites, can you give me one good reason?
I can’t believe i wasted my time visiting this page. What kind of IDIOT considers php better than ASP.NET just because the most frequently used keys are next to eachother? You are the stupidest person i have EVER heard of…Do us all a favor and move to nigeria and start weaving baskets.
aaaaa- Don’t recognize a joke when you see one, eh? Too bad.
I thought the post was great. I prefer PHP and I’d rather rub sand in my eyes than use ASP.NET. (satire of the boil in oil comment)
A web server should never need a gui OS. For this reason alone I wouldn’t use any Microsoft server application if I could avoid it. But this is more about the server and less about the language.
- I found the language very awkward to work with.
- PHP/mysql is faster than ASP.NET/MS SQL server. (Why do you think wikipedia the largest database site uses it?)
- PHP and everything you need to make one of the largest sites on the internet is completely free. And fit together seamlessly no need for expensive licensing/user etc.
The only thing that kinda bothers me about php is the damn dollar sign (which is located next to the % symbol
). This basically puts PHP on par with ASP.NET in your argument. I have however learned to like it since it makes it easy to determine variables.
I’ll have to check out your other articles.
Mark
Great post .. But lets look to this subject more deep .. One reason lead me to prefer PHP than ASP.NET that i dont need to learn more langauges .. All i need to learn is PHP .. On the other hand, to work with ASP.NET i must to learn either C# or VB …
But no doubt, ASP.NET have several advanteges make millions of programmers prerfer it than PHP .. One of its advanteges its seperate server code from HTML code .. in addition , visual studio 2005 presents to programmers many tools that makes the programming operation more easy ..
Any way, PHP presents to me everything i want .. And with full oriented PHP5 we can say PHP is the future of web applications …
In regards to RandoM’s post about splitting up server side code and html code does it mean that if you have a tiny loop for example
php code:
while($r = mysql_fetch_array($q))
{
echo “hi”.$r;
}
would i have to somehow link to the small loop within the code? if so i think that would be a major drawback to asp. however i dont build “applications” per se, mainly web utilities.
thanks
There is a lot of things that are better with PHP:
-Better HTML output (No shit like hidden input tags with loads of gibberish like “q879FSkkSDmdwadwau…”)
-its easier to make PHP communicate with FLASH (again because of the CRAP html .net ouputs)
-Easier to code (this might just be me, but i find it alot easier to use php for image editing, socket communication, file upload, file r/w etc.)
THE ONLY ADVANTAGE IN ASP.NET
is the drag & drop dev enviroment, however i dont see this as an advantage, as you get crappy code. Okay i admit that for newbies its cool, you can just make a dynamic website by dragging little boxes onto your website, but the result will look like every else aspx site on the web.
Also you get all these wierd components that is more or less useless.
Anyone that says you can’t build an application with PHP needs to have their CS degree revoked…if they even have one. Thats like saying you can’t develop an application in C++. The problem with these types of people is that they don’t literally don’t know JACK about development. They love ASP.net and other frameworks because it tells them how to develop. Give them a blank file in an IDE and they’ll crap on themselves. For those of us that actually know how to program PHP is WAY easier to use. ASP.net really brings nothing new to the table. It only solves its own problems and shortcomings brought on by trying to abstract the whole web application paradigm.
As a young developer, very new to the field of web applications, I have come to agree with those who prefer PHP. However, I have very little room to speak, as I only know PHP, and have just begun. Who knows, I may eventually be persuaded into using .NET more after I learn it.
To digress a tad, I would like to add an observation that may or may not be actual or truthful. It seems that the majority of people who know .NET also know C++ or some other language. This makes me believe that PHP will come out the victor for the simple fact that their is no other language requirement. People who want to become a web-developer(applications, pages, etc.), would probably choose PHP for its simplicity and ability to be learned quicker.
Performance wise, I can not judge as I have not tested either but it seems like milliseconds.
Development wise, I can not judge as well because I have not used .NET, only PHP, so I am biased. From what I have seen, it can be more indepth than PHP but also be overcomplicated.
~Ben
What developer wants a server-side technology that decides what HTML/XHTML it’s going to output? Only the ones that don’t care (or don’t understand) proper XHTML.
And I certainly don’t want a billion CSS classes for every element! That’s reason enough for me to move to PHP. Give me clean and semantic markup please. Oh, do any of you even know what semantic means? Didn’t think so!
I’ve been an active PERL / Unix dev for 2 years now, was on .net hysteria before. I find the best language of .net to be vb.net, and even this particular one sucks so extremely hard… why do we need a fucking object for every @½”*+ç little operation? MS pumps up the complexity absolutely artificially. There is nothing you cannot do with plain C, as it’s the 3rd generation lang that is closest to asm.. the farer a programming language derives from expressing the true inner workings of a computer, the more likely it is that it gets into your way. I hate OOP therefore. I disliked it before but I started to REALLY hate it when I saw that basically everything is just a pointer to some memory region… as a programmer, you issue simple commands on these, no matter what language you use.. so why not use one that *doesn’t* hide the *way it really works* from you? Flexibility increases as well as productivity. PHP has a sane level of abstraction, perl even better, c#/vb.net/java (no pointers? wtf why?) and even c++ for that matter have not.
MS generally releases few useful pieces of software, I consider windows as well as directx to be amongst them. Definitely not asp.net and the MS sql server neither.
PHP is better than .net but why .net opening are more than PHP in the market?
to keep people busy a far longer time solving a trivial problem with shitloads of objects and crap that is inherently not needed to solve the problem algorithmically. Procedurally always suffices, or does anyone of you here think the code of an usual business app requires more logic than quake 3? (plain c) … or the freebsd kernel components (also plain c)… or huge parts of windows nt (guess what)… OOP is almost always inefficient, and most useful code written in “OOP” languages (that try to force you into using the concept) has also mostly procedural structures. It’s the way computers work at the end, goddamnit. Not one single object in assembler, nothing.
PHP or perl i dont mind, cold fusion/jsp (never used) and the new visual studio.net products (every release is just excuse for microsofts profits). I like PHP cos its free and they dont care about profits and have full user support!
Wow, I have to say that I am quite suprised. The idiocracy of trying to say that PHP is better than ASP.NET. For certian small websites, sure, use PHP. I own a company that develops software. All we use is ASP.NET… and here is why:
It provides an entirely new programming model for creating network applications that take advantage of the Internet.
Improved Performance and Scalability
• Compiled Execution: ASP.NET is much faster than classic ASP, while preserving the “just hit save” update model of ASP. No explicit compile step is required. ASP.NET automatically detects any change, dynamically compiles files if needed, and stores the compiled results to reuse for subsequent requests. Dynamic compilation ensures that your application is always up to date, and compiled execution makes it fast. Most applications migrated from classic ASP to ASP.NET see a 3x to 5x increase in pages served.
• Rich Output Caching: ASP.NET output caching can dramatically improve the performance and scalability of your application. When output caching is enabled on a page, ASP.NET executes the page once and saves the result in memory before sending it to the user. When another user requests the same page, ASP.NET serves the cached result from memory without re-executing the page. Output caching is configurable, and it can be used to cache individual regions or an entire page.
• Web Farm Session State: ASP.NET session state lets you share session data across all machines in a Web farm. Now a user can hit different servers in the Web farm over multiple requests and still have full access to session data.
Enhanced Reliability
• Memory Leak, Dead Lock, and Crash Protection: ASP.NET automatically detects and recovers from errors such as dead locks and memory leaks to ensure that your application is always available. For example, when a memory leak is detected, ASP.NET automatically starts up a new copy of the ASP.NET worker process and directs all new requests to the new process. After the old process has finished processing pending requests, it is gracefully disposed of and the leaked memory is released.
Easy Deployment
• “No Touch” Application Deployment: With ASP.NET you can deploy an entire application by copying it to the server. Configuration settings are stored in an XML file within the application.
• Dynamic Update of Running Application: ASP.NET lets you update compiled components without restarting the Web server. Unlike classic COM components that required the Web server to be manually restarted when an update was deployed, ASP.NET automatically detects the change and starts using the new code.
• Easy Migration Path: ASP.NET runs side by side on IIS with classic ASP applications on Microsoft Windows 2000 and Windows XP, and on members of the Windows Server 2003 family. You can migrate one application at a time, or even single pages. ASP.NET even lets you continue to use your existing classic COM business components.
New Application Models
• XML Web Services: XML Web services allow applications to communicate and share data over the Internet, regardless of operating system or programming language. ASP.NET makes exposing and calling XML Web services simple.
• Mobile Web Device Support: ASP.NET mobile controls let you target over 80 mobile Web devices using ASP.NET. You write the application once, and the mobile controls automatically generate pages for the requesting device.
Developer Productivity
• Easy Programming Model: ASP.NET makes building real-world Web applications dramatically easier with server controls that let you build great pages with far less code than classic ASP.
• Flexible Language Options. ASP.NET supports not only Microsoft Visual Basic Scripting Edition (VBScript) and Microsoft JScript but also more than 25 .NET languages, including built-in support for Visual Basic .NET, Microsoft C#, and JScript .NET.
• Rich Class Framework: The .NET Framework class library offers over 4,500 classes that encapsulate rich functionality such as XML, data access, file upload, regular expressions, image generation, performance monitoring and logging, transactions, message queuing, and SMTP mail.
Now when compared to PHP there is no comparison!
Oh…My…God…
Not only have you managed to simplify the entire inefficiency and bad design of ASP and .NET down to the bad design used in the tags, but you’ve blown my mind with how true it is!
In regards to Tom’s rather long-winded comment:
You seem to be showing why ASP.NET is better than classic ASP. That’s kind of a given.
Your extensive list of features is great, but if you think these are things PHP isn’t capable of, you have A LOT of research to do. With a little bit of knowledge (which most PHP developers obviously already have, otherwise they would be using ASP) it’s not at all difficult to replicate any / all of those fancy ASP features, and without paying!
Being able to use multiple languages is not a good thing. It’s actually a major problem with ASP.NET, as it means there is no real standardisation.
I own a web development firm that started off as 3 people. 2 years ago we offered both ASP.net and PHP but decided that if we wanted to be good at either one we would have to drop one and use just the other. That is when we decided to go with PHP and drop ASP.net. The reasons behind our decision is conclusive on many of your posts above. When developing good web applications we are more concerned about the final output for our customers sake and not the fact that we saved the programmer an extra day because we made his life a bit more efficient. We want our websites to be custom built specifically for our customers and not carry any unnecessary overhead like ASP.net does. After researching this for about 2 years we decided PHP was the best option for our company. Today we have 12 employees and have been the fastest growing company in our city for two years in a row. Our customers notice the quality of our work and their websites and they keep coming back for more. In the end, that is what really matters. To end this argument, it’s really not about giving the programmers what they need at the expense of the customer’s website performance or visual layout. It’s about making sure that the customers website runs to the best of it’s ability for years to come. With PHP it is possible, and for Tom who wrote the very long article about ASP.net. We do have all of those features in our PHP web applications. Maybe you should visit zend.com and read a little bit more about enterprise level PHP.
Hey Guys, nice posts. you ppl are taking things personally somehow… kiddin. anywayz I just wanted to tell you about my experience, I was a PHP developer during the times at my university, I owe PHP as it’s my first language for web programming, and actually I was with the GO PHP 5 movement, and I decided that I will be object oriented. but then I had to work with ASP.NET for an internship. and I fell in love. maybe PHP is faster, I noticed it as an observer on single page level, I don’t know on stress testing what would happen, but ASP.NET is a rapid Development Framework and language. such as authentication and authorization, membership providers that has a very flexible degree of customization. a whole lot of support, such as Code Project community. Microsoft MVPs across the internet writing articles and making controls. and NetTiers a Tier design code generator, maybe I was more lucky to find parallel solutions to help me develop faster than PHP. finally, maybe if PHP would get a unified framework around it and good IDE that really make things easier I would return back. and believe me I am searching all I got is a IDE from here like PHP designer and framework from there like PradoSoft, Zend or others, a template based generator like smarty… but the end it became a mess and somehow a spagetti. and I know u will tell me ZEND Framework and IDE is for that purpose, but my Zend experience was very bad and it’s not optimized for PHP OOP.
maybe what made ASP.NET better is the IDE and .NET Framework, one framework everybody can base their work on it, one big solution rather than many small solutions.
This is just an opinion of mine
Thank you
php is better than c# because you would rather use the ? over the %… Ya, that’s def the deciding factor when I choose a language for a project… wow.
I program both in PHP and ASP.NET. From my experience, i can say that asp.net is better in performance and it has been targetted to new and _lazy_ developers. It provides too many features - which i just don’t like. For this reason i have dropped asp.Net and started with php. Asp.Net is good for starters. Asp.Net is so easy that anyone can create a website and this potentially can lead to programers unemployment!
{ 1 } Trackback
[...] I have devoted all of my time learning the two handed Dvorak keyboard layout. Why? Definitely after my post just a couple of days ago about the convenience of the QWERTY layout with respect to PHP and navigating a non-Windows machine?!? Because I sit at a keyboard all day long (as most of us programmers do), and I have been suffering from RSI (repetitive stress injury). Being a piano player, I know all about carpal tunnel and proper technique when sitting at the keyboard, and typing is no different. [...]
Post a Comment