.NETGURU
PHP and ASP.NET go HEAD to HEAD
Messages   Related Types
This message was discovered on microsoft.public.dotnet.framework.performance.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.
Post a new message to this list...

showme
PHP and ASP.NET Go Head-to-Head
By Sean Hull
http://otn.oracle.com/pub/articles/hull_asp.html

SUMMARY at the BOTTOM
Speed and efficiency. As I mentioned earlier, ASP.NET is a framework
allowing you to use various programming languages. In addition, it is touted
as having a great object-oriented model. All this is true, but it becomes a
detriment as far as speed is concerned. For all that advantage, there is a
lot more code to run through to execute the same ASP page than you have to
execute in the PHP engine for an equivalent PHP page. PHP is the
quick-and-dirty type of solution, the one to get the job done. And though a
lot of robustness has been added to it since its 2.0 and 3.0 days, it still
retains that core optimized high-speed approach.
Speed is not the only consideration. Memory usage is also important.

SECURITY COMPARISON
ASP.NET officially requires that you use IIS. Unfortunately, IIS has a long
history of vulnerabilities, which makes many administrators reluctant to
deploy it to handle their web site. Whether these weaknesses are because of
Microsoft's ineptness or because IIS is a real red flag to hackers is
irrelevant: Those systems have a history of being hacked and compromised.
PHP runs on Apache, too, which is fast and open source and has a good
security track record. Also, as I mentioned, Apache runs on many platforms.

So is PHP really faster than ASP.NET or is that for certain unoptimized
pages? And are they comparing this against the DataGrid instead of the
repeater control or even the fastest way using asp.net's inline code render
block, <% %>

comments?

Reply to this message...
 
    
Kevin Spencer
> comments?

Consider the source. Also note that a number of comparison criteria are
simply ignored, such as development speed/cost. The most expensive aspect of
development is the cost of developers (man-hours of dev time). While ASP.Net
consumes a large chunk of memory and processor, RAM is cheap; hardware is
cheap; programmers are expensive. ASP.Net is designed to give the
implementers a greater ROI. This is the bottom line when it comes to
software development. That is why Oracle is in so much trouble financially.
It costs more to use it.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"showme" <Click here to reveal e-mail address> wrote in message
news:#A4l#Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
    
Henning Krause
And only think of maintainability... PHP is more Write-Only code ;-)

Greetings,
Henning Krause
==========================
Visit my website: http://www.infinitec.de
Try my free Exchange Explorer: Mistaya
(http://www.infinitec.de/?page=products" target="_blank">http://www.infinitec.de/?page=products)

"Kevin Spencer" <Click here to reveal e-mail address> wrote in message
news:#Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
    
Marcus
[Original message clipped]

Oracle had a net profit of $1 bil last quarter, $8+ bill in cash
($4 Bil after AP and debt), $8 bil in total assets, and revunue is
increasing (quarter over quarter and year over year). Looks like
they are doing pretty good.

[Original message clipped]

Reply to this message...
 
    
Michael Pearson
I could not agree with you more Kevin.

Programmers are expensive (at least here in the USA) and computers are
inexpensive. I'd much rather crank out an entire site in half time time
with ASP.net than spend twice as much time getting the same result in PHP
that runs faster.

It's an ROI thing and a time-to-market thing.

Michael

"Kevin Spencer" <Click here to reveal e-mail address> wrote in message
news:%Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
    
Cowboy \(Gregory A. Beamer\) [MVP] (VIP)
Maintainability costs far more than perf in the majority of the cases. ;->

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************
Think Outside the Box!
************************************************
"Kevin Spencer" <Click here to reveal e-mail address> wrote in message
news:%Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
    
Kevin Spencer
Roger that, Greg. As every professional developer knows, an application is
never "finished."

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Cowboy (Gregory A. Beamer) [MVP]" <Click here to reveal e-mail addressamM> wrote
in message news:Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
    
Jerry Pisk
I'm just going to add one more - MySQL is a lot faster than Oracle. Because
it doesn't support transactions and so on. Does it mean it's better? That
depends, the same way PHP versus Asp.Net depends. You're trading off
features for speed and most of the time it's those features that are going
to make your life a lot easier.

Jerry

"showme" <Click here to reveal e-mail address> wrote in message
news:%23A4l%Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
    
John Timney \(Microsoft MVP\) (VIP)
I've recently had to switch from a PHP app because its performance is not
good enough, however - theres not a web language on the planet that could
have performed to the standards we wanted, so its not a criticism on PHP.
ASP.NET could not have handled the job either and we were using mySQL rather
than Oracle.

What does this imply, well only that you have to take these things with a
pinch of salt, Oracle have an interest in saying this stuff on their site -
and the writer has an interest in more perople switching to PHP as it might
mean more work for him. So the view will typically be biased.

The conclusion should have actually demonstrated some real world
comparisons, including design issues, maintenence, server architectures,
speed of development etc. I think PHP 5 will have a lot to offer and will
only complment the available languages on the web - but head to head with
asp.net will need to be a few pages longer and a bit more fact driven than
what this chap has offered.

--
Regards

John Timney
Microsoft Regional Director
Microsoft MVP

"showme" <Click here to reveal e-mail address> wrote in message
news:#A4l#Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
    
Patrice
The sad truth is that at some point you have to look at things against your
own requirements to make your own mind as you would do for choosing a car
(including both rational and unrelational arguments). That's life.

Patrice

--

"showme" <Click here to reveal e-mail address> a écrit dans le message de
news:%23A4l%Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
    
Sherif ElMetainy
Hello

The author of the article is very biased. I have been worked with PHP and
ASP since 1999 and I worked with ASP.NET since it was beta in 2001. PHP is
much better than regular ASP, but ASP.NET is much better than PHP.

I disagree with the author of the article in the following points:

- ASP.NET can run on Apache as well as IIS

- With Mono (http://www.go-mono.org), ASP.NET can run on Linux and other
operating systems

- IIS 6 doesn't have the bad security reputation as IIS 5, and with a good
administrator IIS 5 can be secure.

- I made a simple XML web service with ASP.NET and PHP 4, and ASP.NET was at
least 10 times faster. I was using nusoap
(http://dietrich.ganx4.com/nusoap/index.php)

- Even in areas where PHP may be faster, ASP.NET is more scalable. So if the
application has a lot of load, you can add more hardware and ASP.NET will
utilize it better and perform faster, while PHP is not as scalable as
ASP.NET

- The cost of development and maintenance for PHP code is much higher than
ASP.NET.

All my comments above are based on my experience with PHP 4, I didn't test
PHP 5, but I think PHP is suitable only for small applications, and never
large applications. For medium to large applications I would recommend
ASP.NET or even JSP, but never PHP.

Best regards,
Sherif

Reply to this message...
 
    
Simon Harvey
Its a fair point, but to be fair the OO aspect is aimed at helping speed
development rather than speed execution. Most sites don't need blistering
speed and processors are getting faster and faster.

The speed issue is becoming less and less of an issue for the majority of
sites. I say this as a web host for many large sites including international
airports

Only one of our sites requires a dual 2.4 xeon machine

Our database server is also dual xeon.

Oh, and php is ugly imho

Let the flames begin

:-)

Reply to this message...
 
    
Bob Grommes
What is "head to head" about his comparison? I don't see the detailed
analysis that "head to head" implies. In fact I don't see much analysis at
all. I wouldn't be impressed even if I were a PHP partisan; indeed, I'd be
worried.

The author of this article is preaching to the choir, giving them some ammo
to use in proselytizing and encouraging the faithful, and some flip
dismissive statements on flash cards to use against doubters. Which is to
say, it's not at all deep reasoning.

He makes bold assertions about performance but makes no effort at all to
support them.

Of course even if he offered code examples and benchmarks, everyone's
mileage (and evaluation criteria) would vary. But at least you would have
some idea what he is basing his statements on.

All in all, this struck me as someone writing to arrive at a predetermined
conclusion but with enough skill to give some appearance of even-handedness
by saying some Nice Things about ASP.NET (just before dismissing it in so
many words as obviously inferior).

Others have already made good points that many cost factors beyond runtime
performance must be considered in comparing platforms -- and ASP.NET is no
performance slouch anyway. Another point for me is that I *like* having all
the core pieces of the platform come from one vendor. I hate the
finger-pointing that goes on when you try to get various products to
interoperate with each other. Say what you will about MSFT development
platforms -- the quality is generally very good and the end-to-end
integration is wonderful, especially if you're a smaller shop.

I don't miss building non-trivial sites in classic ASP. I probably wouldn't
want to take half a step backwards and build one in PHP either, unless PHP
addresses something interesting relative to ASP.NET besides raw runtime
performance.

--Bob

"showme" <Click here to reveal e-mail address> wrote in message
news:%23A4l%Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
    
Cowboy \(Gregory A. Beamer\) [MVP] (VIP)
It is not a fair comparison (Oracle comparison), but I am sure there are
areas where PHP is faster. Even classic ASP beats ASP .NET in some areas.

Much of the benefit of .NET is not in the performance alone. Maintenance,
which is more expensive than perf in most cases, is greatly improved over
ASP and SO much easier than PHP.

But, everyone loves perf numbers. SO much so that I have seen sites that
were virtually unmaintanable, just to squeek out a few more cycles ... on a
site already running well below the bar. I call that STUPID, although some
may disagree! ;->

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************
Think Outside the Box!
************************************************
"showme" <Click here to reveal e-mail address> wrote in message
news:%23A4l%Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
 
System.Web.UI.WebControls.DataGrid
System.Windows.Forms.DataGrid




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification