tags:

views:

593

answers:

5
+1  Q: 

.NET & ASP vs PHP

Earlier today I asked wether it would be a good idea to develop websites using C#. Most of the answers pointed towards .NET and ASP. Currently I develop with PHP. I've dabbled with Python and RoR but I always come back to PHP. This is the first time I've looked at .NET and ASP. A bucket load of Google searches later I'm not really seeing much support for ASP online but then it all seems a bit Biased towards PHP/Apache/MySQL.

It looks like there's a fair amount of .NET and ASP folk around here so I figured it's worth a shot asking for their input in attempt to try and address the balance in my own head. It can't all be bad.

What advantages are there to .NET and ASP over PHP?

+7  A: 

Used:

asp.net vs php site:stackoverflow.com

in Google search and got:

ASP.NET vs. PHP

The use of PHP vs ASP.net

PHP MVC (symfony/Zend) vs ASP MVC vs Spring MVC vs Ruby on Rails?

Career with PHP or with ASP.NET?

GregD
+1  A: 

Have a look at Phalanger. It is PHP running on the .Net Framework and has been making some huge strides in the last few months. Definitly worth investigating when coming from PHP.

Phalanger

Diago
really? that seems to be like getting the worst of both worlds. you still need to have a expensive windows platform host yet your limited to the contraints of PHP.
BPAndrew
Not quite. You have full access to the .Net framework using PHP syntax. Plus existing PHP applications can easily be converted. Overall it really depends on your choice and the learning curve you want to go through. It's an option. Choice is the only thing that matters :)
Diago
ok THAT is an advantage at least, if you didnt get full framework support it would be nothing but the least of both worlds. Personally I really like php and I write my ASP.net like you would PHP. Learning both has been a great experience.
BPAndrew
A: 

I've come from a background in Perl/CGI, Classic ASP, and ASP.NET. I decided to take up PHP to see why there is such a tremendous following. I feel like I've taken a step backwards in the language scale and would rather code in .NET or Perl.

I think Jeff Atwood would up-mod me on this.

spoulson
A: 

I stopped using PHP before PHP5 was out so I my views on PHP are very outdated I suppose. Nevertheless, what I liked about C# (ASP.NET) was that it forced me into acquiring better programming practices (OO in particular). PHP4 was not object oriented. Maybe the later versions of PHP are different. The greatest obstacle I encountered when shifting from PHP to ASP.NET was understanding OO. If objects are not second nature to your programming style, you're likely to find out that your ASP.NET learning curve is going to be much shallower than it was with PHP.

trendl
+1  A: 

I'd say it depends on your background and how much money you have to throw around too. ASP.net has some great features but you may not even need them depending on your project. The tools are expensive, the hosting is expensive.

PHP is great because you get a lot for free, but there are trade offs.

Personally I like .NET better because thats what I started off with, I feel like I can do more with less, but thats a personal preference. I'm sure some vet php developers feel the exact same way too.

BPAndrew