NYCPHP Meetup

NYPHP.org

[nycphp-talk] PHP vs ASP

Chris Hubbard chubbard at next-online.net
Tue Apr 27 17:48:07 EDT 2004


I personally know of a number of production relatively high volume 
sites using IIS and PHP.  For the most part PHP doesn't care what the 
httpd is.

As for the original question, I don't know of any sites that do a ASP 
(which version?) vs. PHP (which version?)

As for the implied question, Is PHP better than ASP?  Depends on how 
you define 'better'.
1.  With ASP you'll usually end up using MS SQL.  With PHP you'll 
usually end up using MySQL or PostgreSQL.  MS SQL is expensive to 
purchase and does require active administration
2.  With ASP you'll usually be using the native objects/classes 
provided by Microsoft.  With PHP well, I don't know if there is a 
usual.  You could use PEAR or any other thing you wanted.  Using the 
Microsoft classes is a significantly steeper learning curve.
3.  With ASP there are well publicized exploits that a hacker can and 
will attempt to use.  With PHP there are still exploits but they're not 
as well publicized and there's almost no way a hacker can guess which 
set of exploits to use before looking at the site.
4.  Internationally I am willing to bet there are more PHP developers 
than ASP developers.  Domestically I am willing to bet there are more 
ASP developers than PHP developers.
5.  In ASP, if an ASP class doesn't behave the way you want, it's 
difficult to dig into it to find out what it's doing, and is a task for 
only strong developers.  In PHP, if a class doesn't behave the way you 
want, then you change it.
6.  Well written ASP vs well written PHP is almost a wash.  The PHP 
code will typically run a bit faster on comparable hardware.  This 
might be a function of the httpd instead of the language.
7.  Well written ASP is as easy to maintain as well written PHP.
8.  It's somewhat easier to create poorly written ASP than poorly 
written PHP.  But not by much.
9.  If you're building a web app, and you're not using FrontPage, PHP 
is a great choice.  If you're building a web app, and you're using 
Frontpage, then ASP is the best choice.
10.  If you're writing code to integrate with MS Office, then ASP is 
the language to use.
11.  If you want to leverage the efforts of 10,000's of developers 
worldwide, and you don't want to be tied to the seemingly random and 
capricious actions of a large corporation, then PHP is the language to 
use.
12.  If you are willing to build your application the way Microsoft 
thinks you should want to build your application, then use ASP.  If you 
want to build the application your way (or the clients way), then use 
PHP.

I started in the VB/ASP world.  I used to work at Microsoft (as a 
contractor) where I wrote ASP code, among other duties.

I personally think PHP is a much better solution to most problems.  The 
thing that sold me on PHP is #12 above.  I've built over 250 web 
sites/applications.  I'd be willing to bet that less than 20 are built 
the way Microsoft thinks I should want to build the application.  This 
is a really big deal.  To me this is by far the most important part of 
the conversation.  I need to have a language/framework that lets me 
build the application the way I want to build it.

There are limitations in both languages.  There are workarounds in both 
languages.  If the boss thinks that ASP is a better language based on 
some marketing-esque stuff that s/he has read somewhere then the boss 
is probably 'wrong'.  But the 'rightness' or 'wrongness' of either 
language depends on your undefined 'better'.

(the other) Chris


On Apr 27, 2004, at 1:01 PM, Chris Shiflett wrote:

> --- "Carlos G. Chiossone" <carlos at sprout.net> wrote:
>> But I don't understand the IIS ASP association.
>
> Guessing a statistic, I bet more than 95% of applications written in 
> ASP
> run on IIS. That is the association.
>
> On the other hand, I bet less than 5% of applications running on Apache
> are written in ASP.
>
> Apache/ASP and IIS/PHP are possible, but these are rare combinations.
>
> Chris
>
> =====
> Chris Shiflett - http://shiflett.org/
>
> PHP Security - O'Reilly
>      Coming Fall 2004
> HTTP Developer's Handbook - Sams
>      http://httphandbook.org/
> PHP Community Site
>      http://phpcommunity.org/
> _______________________________________________
> talk mailing list
> talk at lists.nyphp.org
> http://lists.nyphp.org/mailman/listinfo/talk
>
Chris Hubbard
chubbard at next-online.net
425 563 4153




More information about the talk mailing list