-
Website
http://www.fanphp.com -
Original page
http://www.fanphp.com/2008/07/31/which-one-and-why-php-or-aspnet/ -
Subscribe
All Comments -
Community
-
Top Commenters
-
chrisranjana_com
1 comment · 1 points
-
Md Emran Hasan (phpfour)
1 comment · 1 points
-
TRIVUz
1 comment · 1 points
-
-
Popular Threads
I wonder why the image says ASP.NET is weak in speed and efficiency. I find it quite good in reducing development time and several performance tests indicate that it runs faster too.
-Nitin
PHP compilations involve the PHP engine changing it to the executeable form of the page (similar to how Java uses byte code in its "compiled" state). Furthermore, the only way to then achieve similar speed to ASP.NET is to CACHE the "compiled" version of the PHP scripts. This is how the Zend Accelerator works.
At no point does the PHP code ever become machine level code.
As to running PHP vs ASP.NET on a Linux server, there is Mono (go-mono.com) so that you can run ASP.NET on a Linux server, but maybe due to a poor implementation it has speed problems? I don't know, I have never used .NET on a Linux machine. My first guess is that ASP.NET is still faster on Linux than PHP.
Scripts cannot beat machine code because at the end of the day, you're running another program in order to execute the script, while the machine code runs as is.
Please take a look at this article. Very funny:
http://compsci.ca/blog/if-a-programming-languag...
I read your point of view. as i mention i have never used asp.net, so i get knowledge from your comments.
Bye the way the link was superb :)
Database Access
The author states that .NET forces you to use an ODBC driver. In fact, .NET ships with optimized data providers for ODBC, OleDB, SQL Server, and Oracle. The data framework is interface-based and extensible, meaning that you can write optimized drivers for other database backends. Open source drivers are available for MySQL (http://dev.mysql.com/downloads/connector/net/1....), PostgreSQL (http://npgsql.projects.postgresql.org/), and other data sources.
Execution Speed
Artem is correct - .NET pages are compiled to intermediate language, and then machine language the first time they are accessed. The compiled page is then cached as a DLL for subsequent requests. Contrast this with PHP which must parse and interpret the page for every request.
Environment
You can certainly get .NET running under Apache without having to proxy requests to IIS (http://weblogs.asp.net/israelio/archive/2005/09...).
Cost
The .NET runtime, compiler, and SDK are available as a freely redistributable download, and there are a number of freely available development environments (SharpDevelop or MonoDevelop on Linux, Eclipse plugin). If you want to run .NET apps on a Linux server and avoid all licensing costs you can always go with Mono as Artem mentioned.
Although I'm primarily a .NET developer I'm not really advocating one technology or the other. Just make sure that you're making your decisions based on accurate information.
Thanks for your nice answer. it makes me clear about the features of ASP.NET.
@Artem Gassan
Thanks to you also for your nice suggestion.
ASP.net -->
Platform price $$
Speed: WEAK ( as you are comparing with PHP )
Source available ? ( NO )