meywd:... like UNIX, it has the best performance so it’s widely used for servers also its cheap, windows on the other hand is good for home users and user friendly so its widely used for home users and business, because its easier...
Well, that was true for IIS versions prior to 6. Version 6 and 7 of the IIS server are
far more efficient than apache, why ?
Because:
1. IIS and ASP.NET are built on a multi-threaded architecture, where PHP and apache are using a single-threaded architecture, which makes it blocking the process for the whole duration of the request and multiplying processes as the server gets more and more requests.
2. ASP.NET has a mechanism called Connection Pooling, which opens a predefined number of connections to the database and reuses it for all the requests. Then let's say we have 100 request, it will generate 5 connections to the database. On the other hand, PHP opens connection (or more) on each request, which represented in our example will give us 100+ connections for 100 requests.
3. ASP.NET is compiled, while PHP is interpreted, PHP compiled with Zend encoder will be equivalent to ASP.NET's state when it's transformed to MSIL, but on the first run (or executing NGen) the MSIL gets converted to machine's native binary, which makes it times faster than PHP.
4. PHP files are read from the hard disk on every request, while ASP.NET is cached in the RAM. And as you know that 80% of application's execution time is sent on IO operations, Database connections and other external resources (web services, etc...)
I can count far more point which show that asp.net is superior to PHP, but that's not my point. Everything finally comes back the the skills of the developer itself, you know how slow Ruby on Rails, or Django (Python) is, right ? but you also see a lot of impressing apps created with it. The factors that I've mentioned above are only helpers, because you could create a crappy and inefficient asp.net app (like passing a DataSet to a web service instead of a POCO filled , lets say by NHibernate), and in this case, no matter how ass-blowing are your caching systems, your architecture, the app will still be slow.
Ahhh, and one more thing... The AJAX components in ASP.NET are incredible, but you could achieve the same (of not better) effect using javascript framework like jQuery or Prototype.
And regarding the hard-use of linux, maybe it's true if you use a not suitable distribution, but have you tried something like slackware or ubuntu ? with KDE4 and Beryl ? here you have some screenshots and screencasts: (all on slackware linux version 12)
http://jarzebski.pl/admin/store/fm_thumbs/c78717d0054c049174dffb79c90e0f43.jpg
http://jarzebski.pl/admin/store/publish/oxy_menu2.jpg
http://jarzebski.pl/admin/store/publish/oxy_window.jpg
http://jarzebski.pl/admin/store/fm_thumbs/4ef813f31e8ac62a0b32382eb009bc2d.jpg
http://jarzebski.pl/admin/store/fm_thumbs/7e429c0948adfd3a89eb1757bc54cb05.jpg
http://jarzebski.pl/admin/store/fm_thumbs/5b14794d397d76dc2d1a49f1f61125e3.jpg
http://www.youtube.com/profile_videos?user=BastionPL
And thank you Muhanad Omar for welcoming me :)
My $0.02 .