26

I have opened a large web project on elance for a social network. I got over 30 bids on my project and many of the providers recommended php even though they had .net knowledge. many have said that php with drupal has many advanteges over the .NET framework but did not say what they were. Its hard to believe that a scripting language has advantages over a compiled language. Am I missing something here.

Luke101
  • 63,072
  • 85
  • 231
  • 359
  • 4
    Should be a community wiki. There is no definitive or correct answer to this... – KP. Oct 21 '10 at 15:53
  • 2
    Scripting vs compiled: http://stackoverflow.com/questions/2966150/scripting-languages-vs-compiled-languages-for-web-development – webbiedave Oct 21 '10 at 15:59

6 Answers6

31

PHP will run on essentially any server, for free. That's a fairly compelling feature for many folks.

There are lots of pros and cons of both, and it certainly doesn't boil down to scripting vs. compiled (incidentally, opcode caches like APC and things like Facebook's HipHop even the score on that point).

I'd say if someone's recommending PHP over ASP.NET, they code primarily in PHP. If they're recommending ASP.NET over PHP, they code primarily in ASP.NET. There's probably not much more to it than that in the responses you're getting.

ceejayoz
  • 176,543
  • 40
  • 303
  • 368
  • Agreed. If they want PHP, it's probably because either that's what they're used to supporting, or because they don't want to shell out for .NET servers and MSSQL licenses. It shouldn't really matter from an end-product standpoint which you use, I doubt there's anything that's doable in one that would be completely impossible in the other. – Brad Westness Oct 21 '10 at 16:03
  • 15
    I chose PHP because, for the long-term, I don't trust the [longevity](http://en.wikipedia.org/wiki/Category:Discontinued_Microsoft_software) or [proprietary nature](http://en.wikipedia.org/wiki/United_States_v._Microsoft_Corp.) of Microsoft products. – Alex W Jan 02 '14 at 22:46
  • Note that ASP.NET is free and now open source. – Alex Jun 03 '18 at 02:09
  • @Alex It has been a fairly shocking turnaround on the part of Microsoft since this answer was written eight years ago, for sure. – ceejayoz Jun 03 '18 at 02:46
26

Ugg, the weekly PHP vs ASP/.net argument. Let me frame it this way:

  1. Both work. Well, actually.
  2. Neither is really more "enterprise grade" than the other.
  3. .Net developers (at least in my area) tend to make more. That being said, the Government "drank the microsoft Koolaid" and most jobs in my area are for government contractors. It may be different where you are.
  4. PHP really doesn't have a great GUI yet. Not an issue to those of us who are command-line types, but it could be for you.
  5. .net solutions tend to be relatively unified since Microsoft is driving the bus. There's about a million different ways to skin a cat in the PHP world because it is relatively fractured.
  6. In my experience, PHP tends to be better documented with many more how-to's online. If you disagree, you might be a writer for Microsoft's tech net, which is written partially in some alien/geek mashup dialect of English.
  7. MANY php how-tos and forums are frequented by non-native English speakers, and entire projects can be frustratingly impossible to understand because of the language barrier. It seems that Europe has picked up PHP at a higher rate than those of us in the States.

I was indirectly involved in a Microsoft Case Study that I think illustrates the difference. I worked at one Olympic non-profit on a php-based site. They opted to standardize on Microsoft and move to an entirely .net/sqlserver based. I moved over to another nearly identical non-profit (just a different sport) who was embarking on an in-house build of a PHP-based website with nearly identical functionality to the one I left.. The .net website, when completed, cost $1.5 million, involved 16 servers, and required 3 additional full-time staff hires to extend and maintain. The same level of service, programmed in-house by 3 guys on PHP in a shorter amount of time ran on 3 servers (two application, one MySQL DB) and cost about $25k when all was said and done. Microsoft published the .net solution as an official Microsoft Case Study success. You be the judge....when you compare the solutions, I'm not sure they're even. Both serve nearly identical traffic and process very similar amounts of money. I know where my time and money would go.

bpeterson76
  • 12,918
  • 5
  • 49
  • 82
  • 6
    One cannot compare two projects like that. In virtually all cases, two identical projects can cost vastly different amounts of money depending on management style, programmer proficiencies, and budget available. If you have 1.5 million to spend, they will spend 1.5 million. If they have .5 million to spend, they will spend that too. – Erik Funkenbusch Oct 21 '10 at 16:44
  • 4
    Well, I agree to an extent....people will spend what they feel comfortable. And I do think there was an element of ripoff by the Microsoft consultants. However, that $1.5 million had to cover servers, licensing, extra bodies, etc AND took more time. That in my book is the fail. The fact that Microsoft validated it with the published case study tells me that they thought the 1.5 million solution was the best possible scenario. For same traffic, same functionality, same e-commerce, same reliability, I don't think it's even a contest. And that's scary! – bpeterson76 Oct 21 '10 at 17:06
  • @bpeterson76 You can't compare like that. And if you included the licenses that's wrong too, .NET doesn't force you at all to use SQL Server (or even Windows!). So you made a lot of choices there that are not related to .NET. If they decided to use 16 servers instead of 3, SQL Server instead of MySQL and other paid tools instead of the free ones, that should be out of the equation. – Diego Jancic Dec 15 '14 at 13:28
  • 1
    Diego, I never said you had to use any particular servers, nor did I make a definitive statement as to which was better, which is important for this context....all I was illustrating is that two nearly identical projects accomplished their goals in two very different ways, and the Microsoft way (which was both consulted on by Microsoft and touted in their press releases as a great success) was clearly over-engineered and prohibitively expensive. The primary reason for that expense was licensing, hardware "horsepower" requirements, and overpriced consultants. – bpeterson76 Dec 15 '14 at 16:25
  • "The primary reason for that expense was licensing, hardware "horsepower" requirements, and overpriced consultants." Maybe the latter if MS was the consultant. Anyone who paid a majority of their 1.5M budget on 16 servers and some licensing is an idiot. Those would be some serious servers. Now asking MS to be my direct consultant, I can see a huge price tag for. Was MS the consultant on the php version too? – Ricketts Aug 13 '15 at 15:37
  • Majority of cost for the .net solution was indeed consultants, forwarded by Microsoft as "best in the area" but it was not Microsoft themselves....they were brought in to support the 3 in-house staff who also contributed and maintain the project currently with additional outside contractor help (more ongoing $$$) That being said, 15 high horsepower servers and licenses weren't cheap compared to our 3 entry-level Dell blades. The PHP version was built by 3 in-house staff, no consultants required. We wrote the code, designed the DB, built out the servers, and did our own testing and support. – bpeterson76 Aug 13 '15 at 16:56
5

The most significant advantage of PHP might be that it is free and you can start developing it without having to install too many things. (Apache, PHP and an editor)

After working with the Prado framework for a while, I don't see any big differences with it anymore.

OF Course : Visual Studio makes developing and debugging ASP.NET apps a dream.

Faizan S.
  • 8,634
  • 8
  • 34
  • 63
4

I tend to prefer c# development to php development, but both are perfectly valid choices.

One of the main advantages php has over asp.net is just the volume of ready made components, controls, libraries, and frameworks out there that are available for use.

It is entirely possible that your project could be assembled in php much faster than in asp.net if the right tools are available.

Matthew Vines
  • 27,253
  • 7
  • 76
  • 97
4

It doesn't really matter if you choose PHP or ASP.Net, both can deliver, both have a solid base, both are proven technologies. PHP is a mite cheaper, but ASP.Net is getting there.

Unless you're going to maintain the app for a long time ASP.Net's superior OOP capabilities aren't going to offer you much advantage. But if you've got a non-trival app then the multi-layered ASP.Net approach might be helpful.

Just get the coder you're most comfortable with.

Cyril Gupta
  • 13,505
  • 11
  • 64
  • 87
3

I would choose ASP.NET mainly because of Visual Studios, makes programming a lot easier.

I would choose PHP mainly because of variety of frameworks, such as CodeIgniter.

tpae
  • 6,286
  • 2
  • 37
  • 64