Actually it is impossible to answer and has been brought up many many times before. It depends on whether you prefer a dynamic scripting language or a strongly-typed modular language. I'd suggest you start with PHP though as then you don't have to deal with more advanced Asp.net concepts like events, controls, viewstate, class libraries, e
tc. You can pick those things up easy enough once you've got to grips with the syntax and programming for the web.
tc. You can pick those things up easy enough once you've got to grips with the syntax and programming for the web.
ASP and PHP are similar in that both tend to put their code in with the HTML, and so the logic can be quite similar.
But, ASP.NET will be very different from PHP in design, as there is a strong incentive to use code-behind in ASP.NET, where you basically have the html template and all the code is in another separate file
Depending on what you are doing, how busy your site is, you may find that the speed difference is inconsequential, though one is compiled and the other isn't.
PHP is probably going to be faster to develop, as you can more easily code a little and test, than you can with ASP.NET, but ASP and PHP are similar in how you can develop.
If you don't know any of these languages then PHP may be the easier one to learn, as the php manual is so well written, with lots of comments from users, and ASP.NET has replaced ASP, so learning ASP for a new project, IMO, is of limited use.
If you go with ASP.NET then you are learning a new syntax and one of the .NET languages, but depending on your background, C# may be relatively easy to learn.
With ASP or ASP.NET you are stuck with using IIS for your server, but with PHP you can use IIS or Apache, so there is considerable flexibility there.
With ASP.NET you will find more options to help with code development, as they now have the classic ASP.NET and ASP.NET MVC (http://www.asp.net/%28S%28d35rmemuuono1wvm1gsp2n45%29%29/mvc/), both with pros and cons, but I believe this site is still written in the latter.
So, which would be better depends on what you are going to be doing with it, and what languages or frameworks you have already gained experience with.
ASP.net is quite cheap - you can use free ide like visual studio web developer express edition - the only thing you lose is things like source control and some other features available from professional edition onwards.
ASP.NET can do threads, while PHP cannot. Honestly that's about it. Someone will come and nit-pick about some other complicated task that PHP can't do, but PHP is a pretty robust and dynamic language overall.
If you are starting now and have never done C# or VB development, I would do PHP instead. It's much easier to pick up and has far fewer rules compared to C#. Yes, it can lead to bad coding practices because it is so loose and open. However, the documentation is phenomenal and you'll be moving much more quickly than you would in ASP.NET with no C# or VB experience.
Frankly speaking, once you are into professional development, the benefit of going for VS professional edition far outweighs the costs associated with it.
Apart from the tooling costs you have to consider the following costs and benefits
- Windows server - though you can run this on mono, I rarely see people choosing ASP.net for the specific case of running on mono. Windows server and IIS is a far better option to run ASP.net and the cost is justified due to easier management of Windows
- Cost of training - this is only if your current team is not trained in ASP.net
- Cost of development - here you actually stand to gain a little because the tooling for .net platform is by far the best. You will see productivity of even average developers improve a lot and good developers too can benefit from all kinds of features. Debugging capabilities, advanced intellisense, and overall better integration with other tools like VSTS make this a worthwhile investment.
- SQL Server - in case you decide to go for the paid editions, then there is a cost associated - again its not necessary, for most applications, an express edition might be quite sufficient. I must say that there are many features I have gotten used to in SQL server that are not present in MySQL and Postgresql. Merge replication is one of them, but there are others as well. Do your own research to see if the cost is worthwhile for your application.
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.
ASP and PHP are similar in that both tend to put their code in with the HTML, and so the logic can be quite similar.
But, ASP.NET will be very different from PHP in design, as there is a strong incentive to use code-behind in ASP.NET, where you basically have the html template and all the code is in another separate file
Depending on what you are doing, how busy your site is, you may find that the speed difference is inconsequential, though one is compiled and the other isn't.
PHP is probably going to be faster to develop, as you can more easily code a little and test, than you can with ASP.NET, but ASP and PHP are similar in how you can develop.
If you don't know any of these languages then PHP may be the easier one to learn, as the php manual is so well written, with lots of comments from users, and ASP.NET has replaced ASP, so learning ASP for a new project, IMO, is of limited use.
If you go with ASP.NET then you are learning a new syntax and one of the .NET languages, but depending on your background, C# may be relatively easy to learn.
With ASP or ASP.NET you are stuck with using IIS for your server, but with PHP you can use IIS or Apache, so there is considerable flexibility there.
With ASP.NET you will find more options to help with code development, as they now have the classic ASP.NET and ASP.NET MVC (http://www.asp.net/%28S%28d35rmemuuono1wvm1gsp2n45%29%29/mvc/), both with pros and cons, but I believe this site is still written in the latter.
So, which would be better depends on what you are going to be doing with it, and what languages or frameworks you have already gained experience with.
No Comment to " ASP.NET OR PHP? "