Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

In many freelancing websites, you see many job ads for PHP (backed by MySQL). However, job ads for .NET, Java, Ruby, etc. are not that much. What are the reasons which make PHP so popular for freelancing? Is it because of its importance? Or is it because PHP is free?

The reason I'm asking this question is that, I'm an ASP.NET developer and while I see that ASP.NET development productivity is higher (because of fascinating tools it has), it still doesn't attract developers as much as PHP. I want to know if I'm missing something here that I should take into account or no.

share|improve this question
5  
"because of fascinating tools it has" sarcasm? –  Mauricio Aug 30 '11 at 4:11
    
When you need a $300 (r#) tool on top of $800 IDE to be productive, deploying to instances at min $300 svr license (on some Open * licensing plan - ex. web edition). Restricted realistically to one OS, how many have used MonoDevelop? XBuild beyond basic .csproj? Is it really that surprising? –  sa93 Aug 30 '11 at 17:07
add comment

6 Answers

up vote 16 down vote accepted

One reason - cheap and ubiquitous hosting.

share|improve this answer
1  
But @Yuriy, ASP.NET is free. Visual Web Developer Express is free (and really powerful). SQL Server Express is free. IIS is free. The only thing you have to pay for, is an operating system, if you're running your own server, or the hosting price. Does it really make PHP more cheaper enough to be loved this much? –  Saeed Neamati Aug 30 '11 at 4:59
6  
Ubiquitous hosting, that's the key. That's how PHP and mySQL took over. –  Yuriy Zubarev Aug 30 '11 at 5:01
2  
@Saeed: but MS OSes are not so great for servers –  ysdx Aug 30 '11 at 8:06
3  
@ysdx This is a very old stereotype which has little basis in reality nowadays. –  quant_dev Aug 30 '11 at 10:44
4  
@Saeed: Development may be free, but from hosting companies points of view, it costs tens of thousands of dollars for Microsoft systems and platforms (Windows Server, SQL Server, etc.) whereas a LAMP stack is free. –  Jarrod Nettles Aug 30 '11 at 16:06
show 4 more comments

You are thinking of this from the wrong side. I quote:

I see that ASP.NET development productivity is higher [...], it still doesn't attract developers as much as PHP.

But you're looking at job ads. Job ads are not written by passionate developers, but by the business people who wants things to be done at the lower cost, no matter if the language sucks as PHP.

From their position (imagine it's written in bold Arial Black 200), PHP has strong benefits over ASP.NET:

  1. ASP.NET is Microsoft. Microsoft is evil. So ASP.NET is evil. It may not be true in some countries, especially United States. It is very true on the other hand in others. In France, small or medium size companies have a very poor opinion of Microsoft, and mostly large companies use ASP.NET, sometimes for legacy purposes.

  2. ASP.NET is a proprietary product. You do not want to depend on a product of a precise company. Here's the problem. Microsoft had ASP. It sucked, but it was used by companies. Then Microsoft released ASP.NET, and ASP become obsolete. Today, Microsoft releases ASP.NET MVC. What will happen to ASP.NET, considered by many people as too ugly compared to ASP.NET MVC?

  3. ASP.NET can be run on Windows and... well, that's all. PHP can be run everywhere, especially on both Windows and Linux. Linux is free. Windows Server cost is so high than no many small companies can afford it on their server. I don't even mention the price of the optional Microsoft SQL Server.

  4. ASP.NET cannot be used on Apache, while Apache is the most used server and most system administrators know how to administer it. Of course, there is Mono, but it's more a solution for geeks, not for a person who runs a business.

  5. ASP.NET hosting is slightly more expensive, due to the cost of Windows Server. But maybe it's just an impression.

  6. ASP.NET developers are not too many, while there are plenty of inexperienced PHP programmers ready to work for food. If you don't need a high quality website, the cost may be reduced even more.

  7. ASP.NET is compiled. If you forget to say in your contract that the developer must provide you the source code, you may find yourself with the binaries only. What if you want to search for another developer to modify the project later? In PHP, source code may be obfuscated, but it's not the usual practice.

  8. ASP.NET is not widely used. Even in reality it is, the business people don't see it too much (again, it must be false in USA, but is certainly true in France and probably other countries in the same situation). One of the most known websites using ASP.NET MVC is Stack Exchange. But have you seen a business person who knows what it is? It's very easy to convince a person to use PHP. "Look, Facebook uses PHP. Wikipedia uses PHP. How can it be bad?" Business people like those simple arguments, and remember them much better than "Do you know that actually Facebook developers themselves said that PHP suck because of its poor performance?".

Additionally to those points, business people often have strange reasons to choose PHP. For example I often hear them saying that "PHP is more secure" or "PHP is faster than ASP.NET because it's not compiled¹". I never succeeded to make them explain why is it so and where have they heard this stupidities.


¹ Actually this one comes from a few websites or forums comparing PHP with ASP.NET and written by less than competent people. I quote the first link, because at this level, it's just... astonishing: "ASP.net is compiled into memory in binary code. So, when ASP.net is used for coding, it is evident that it takes much longer time to process since the codes need to be retrieved from memory. However, PHP is not compiled into memory like ASP.net is. It is interpreted at runtime. That is the reason why PHP coding leads to better speed and even efficiency.".

share|improve this answer
    
@downvoter: explaining the downvote may help to improve the answer. –  MainMa Aug 30 '11 at 6:00
    
this was a good explanation with reasons. +1. I don't know why some people like to downvote without mentioning why? This behavior is not acceptable at all. Your formatting is also very good. Thanks. –  Saeed Neamati Aug 30 '11 at 6:36
2  
I think the downvote was because of the "Microsoft is evil" statement. I'd upvote but I disagree with some points, for example you state that ASP.NET is not widely used, which might be true for public websites but in corporate/enterprise environments it is indeed widely in use. More so than PHP in my experience. Also I think that you can use ASP.NET with Apache if you install Mono. –  Falcon Aug 30 '11 at 7:08
1  
-1: Business people love Microsoft. The old saying was "You never get fired for buying IBM". This could easily be said for Microsoft these days. Your statement is almost universally false, with very few exceptions outside the tech world. –  Morgan Herlocker Aug 30 '11 at 15:25
1  
-1: Bullet points 1 and 2 are not universal. #3, #4 and #5 are demonstrably false (see Mono). #6 is debatable: I know many .NET developers. #7 is a non-issue when developers are hired full-time and not as a consultant. #8 is simply not true - The StackExchange family of sites is all written in ASP.NET, and I run into ASP.NET sites almost as often as I see the .php extension in URIs. –  greyfade Aug 30 '11 at 15:48
show 4 more comments

IMO the answer is a very low barrier to entry, and very little required to get started, not to mention a plethora of free tools to get up and running quick. You can set up a PHP development environment relatively quick and for the princely sum of $0. You can set up a PHP server for $0, and for production hosting it's typically cheap as dirt; a couple of bucks a month.

Compare that to .NET, which requires a few thousand (unless you are part of a program that gives you it for free e.g. BizSpark) dollars for licenses and software, another thousand or so for high-end tools (You can use Express, but compare to PHP where Eclipse/Netbeans/Aptana/etc. are free and fully-featured). Or compare that to Ruby and Python and their frameworks which require more knowledge and are still relatively unknown in most major areas.

share|improve this answer
    
I was going to give you +1 until you said "... .NET, which requires a few thousand [...] dollars for licenses." Go check out the Mono project. –  greyfade Aug 30 '11 at 15:51
1  
Mono isn't mainstream, despite what the pro-Mono people believe. When folks talk about .NET they mean the Microsoft brand 99% of the time, which isn't free unless you're part of BizSpark/WebsiteSpark. –  Wayne M Aug 30 '11 at 15:55
    
That is true, but what self-respecting company that uses Windows extensively doesn't already have BizSpark? –  greyfade Aug 30 '11 at 15:58
1  
@greyfade what happens after 3 years? you've either scaled or failed, and if the first its probably more an operating cost than the building you rent. –  sa93 Aug 30 '11 at 16:56
add comment

ASP.NET runs on Microsoft servers. So, in order to have ASP.NET running, the company must have obtained the appropriate licenses. If a company has the money to purchase licenses - these aren't cheap either - then it's very likely they have the money to pay for an in-house development team.

share|improve this answer
    
-1: Actually, you can run ASP.NET on any platform supported by the Mono project. –  greyfade Aug 30 '11 at 15:49
    
@greyfade. True. Who pays for expertise in setting that up, for configuring the frontend nginx instance, for the CI that must work with xbuild and not msbuild, for the issues present in mono 2.4. It was something I push for until I realised our MS techies were cheaper than component alternatives. –  sa93 Aug 30 '11 at 16:55
    
@greyfade also when you say supported by the Mono project that's a very loose statement, you are cheering for the band after the roadies have started dismantling the stage. Things certainly arent as strong (support wise) as they used to be, and as we see with the core Mono team putting their efforts into, not MonoDevelop and Linux platform tools, but MonoDroid and MonoIpod (forget real name) for Visual Studio (on Windows only platform) I would rein in the Mono chants. –  sa93 Aug 30 '11 at 17:19
add comment

From my point of view, there is a simple reason for a freelancer to choose PHP over ASP.NET: it's free, and as a freelancer, I do not have to pay anything to develop a website for a customer. That is a big deal, especially for my customers.

This basically says that I will spend less money and get more happy customers. Remember, customers that normally seek freelancers don't really want something big and highly sophisticated which also adds another point to why they'd like to spend less money and thus says why I should develop their websites in PHP rather than anything else.

share|improve this answer
add comment

PHP is still to my knowledge the only language that provides straight forward, no-frills application development and deployment.

Other interpreted languages such as Python and Ruby are slower when hosted in basic CGI modes, not conducive for cheap or free hosting. Perl is well known for its learning curve but more importantly its error handling is adverse to hacker web development methodology.

Everything else requires a setup process, Django, Ruby-on-Rails, Java, which acts as a huge barrier to stop people playing with web technologies.

share|improve this answer
    
The only language slower than Ruby is PHP. No, really. It is. The poor performance most people see in Ruby web apps is due largely to Rails, which is an absolutely massive framework. That might give Ruby a poor reputation for performance, but I see cheap web hosts all the time that claim support for Rails. –  greyfade Aug 30 '11 at 15:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.