tags:

views:

105

answers:

3

I am not here to add another subjective question.

I know that many developers are using only ASP.NET and others Only PHP......

in my case where my team uses both, of course more advanced in one,

I like to know the keys to choose one ? can you guys list all the Pros, and cons for those language? I know both are good, Dont be BIASED.

answers for other langauges are welcomed.

I will add one pro for DOTNET: C# is used for all kind of developments( Web, windows..)

+10  A: 

Both are good systems on their accord. Apparently Asp.Net has the advantage of being able to utilize a more mature platform, and better languages (f# - but it's personal taste), and PHP has more world ready open source applications. But these does not answer which one to use in a project.

It depends on many factors. For example:

  • Size of the project (PHP might be better for small size quick solutions)
  • Size of any existing codebase
  • Requirements of the client (or boss, etc).
  • Deployment environment (Asp.Net is not good on Linux)
  • Risks (Asp.Net comes with very good anti injection mechanisms, for PHP you'd need consistent use PEAR libraries)
  • Availability of programmers on your team

Baseline: It's generally a business decision, not a technical one.

sukru
+1 for "It's generally a business decision, not a techical one."
Dean Harding
+1 for a well rounded answer that doesn't descend into FUD on either side.
Billy ONeal
A: 

This has been asked and answered a thousand times over.

As with any language decision, the experience of your team is the biggest influence.

If you want easy to outsource code and come from a scripting background (e.g. front-end devs doing the odd code snippet back-end modify) I'd back PHP.

PHP pros:

  • Cost advantages.
  • More existing code (e.g. Wordpress).
  • Greater level of online support.
  • Easier to find new "coders".
  • Quick to get going.
  • Great for small projects.

PHP cons:

  • Writing bulletproof code is tougher.
  • Debugging cost is pretty high. Perhaps tooling helps this one.

If you have developers who were brought up on VB.Net or are recent uni graduates without any web experience/mentality then ASP.NET is a definite possibility.

ASP.NET pros:

  • Quick drag-and-drop controls.
  • Pseudo-hides the web page cycle from developers who are not web-friendly.
  • C# is a much nicer language than PHP. VB.NET is perhaps too.
  • Validation and AJAX are pretty easy.

ASP.NET cons:

  • If you know the web then ASP.NET can get in the way.
  • The cost if you move to an enterprise level can be larger, but for the most part there are various legitimate ways to get discounted or often free software under Microsoft programs.
  • Harder to find cheap labour.
  • Often obscure bugs related to leaky abstractions.

If you have developers who know what they're doing on the web, and are decent coders too (a programming background) then ASP.NET MVC is the way to go.

ASP.NET MVC pros:

  • Gets out of your way / minimalist approaches to code and markup.
  • Minimal bugs and typically easy to correct the ones that exist.
  • Highly testable.
  • Highly modular (can write views as PHP style code if you wanted, or HAML or anything).

ASP.NET MVC cons:

  • No drag-and-drop controls (same as PHP).
  • The cost is the same as ASP.NET.
  • Harder to find coders (you'll probably be training someone with talent at this stage).
  • Combined Client+Server validation still feels like it's getting there, but it's on par with PHP at least and there's a lot of cool auto-binding.
Graphain
"C# is a much nicer language than PHP. VB.NET is perhaps too." let the wars begin
Earlz
@Earlz, yeah let that one slip. Still I can't imagine many programmers arguing that C# isn't nicer than PHP for your particular measure of nice. Most people only hate C# because Microsoft are behind it.
Graphain
I think we can all agree that it's an accomplishment for a language to be worse than PHP. And that comes from a (mainly) PHP coder who wouldn't touch the Microsoft development universe with a ten foot pole. ;)
deceze
@deceze: Well, I don't know. There is ECMAScript.....
Billy ONeal
And perl. PHP doesn't look like cursing, at least.
Eric
@Billy I actually think that ECMAScript as a language is leagues better than PHP. What sucks about it is the environment it's usually run in. The few flaws it has (like optional `;`'s, `+` for concatenation) are insignificant compared to the verbose pile of retroactively tacked on features that PHP is.
deceze
A: 

just want to add that asp.net works perfectly fine on Linux and MacOS Server under Mono. We use it in production without issues.

Fluffy D. Bunny