Is php better than ASP?

JMaster

Golden Member
Feb 9, 2000
1,240
0
0
I've been using ASP for a while now, I haven't really used PHP before, but I do know that it runs on Linux/Unix servers. I've also noticed that most webhosts cost more for ASP (Windows) hosts.
What's the difference between php and ASP performance wise?
 

notfred

Lifer
Feb 12, 2001
38,241
4
0
PHP is faster than ASP, but I'm not intimately familiar with the operating details of either.

mod_perl is faster than both of them.
 

RbSX

Diamond Member
Jan 18, 2002
8,351
1
76
Well neither of them are really better than eachother. ASP works on Windows based platforms, while PHP works on Linux based platforms. Essentially you can do exactly the same things with them, so they are equally as useful. But if you look in depth there are probably more LINUX(or linux based) servers out there so PHP might be a bit more useful in the long run...
 

notfred

Lifer
Feb 12, 2001
38,241
4
0
Originally posted by: RyanSengara
Well neither of them are really better than eachother. ASP works on Windows based platforms, while PHP works on Linux based platforms. Essentially you can do exactly the same things with them, so they are equally as useful. But if you look in depth there are probably more LINUX(or linux based) servers out there so PHP might be a bit more useful in the long run...

I'd like it if you could explain to me what a "linux based' server is that doesn't actually run linux.
 

Czar

Lifer
Oct 9, 1999
28,510
0
0
Originally posted by: notfred
Originally posted by: RyanSengara
Well neither of them are really better than eachother. ASP works on Windows based platforms, while PHP works on Linux based platforms. Essentially you can do exactly the same things with them, so they are equally as useful. But if you look in depth there are probably more LINUX(or linux based) servers out there so PHP might be a bit more useful in the long run...

I'd like it if you could explain to me what a "linux based' server is that doesn't actually run linux.
probably including bsd and other variants

 

notfred

Lifer
Feb 12, 2001
38,241
4
0
Originally posted by: Czar
Originally posted by: notfred
Originally posted by: RyanSengara
Well neither of them are really better than eachother. ASP works on Windows based platforms, while PHP works on Linux based platforms. Essentially you can do exactly the same things with them, so they are equally as useful. But if you look in depth there are probably more LINUX(or linux based) servers out there so PHP might be a bit more useful in the long run...

I'd like it if you could explain to me what a "linux based' server is that doesn't actually run linux.
probably including bsd and other variants

BSD is not linux based.
 

Czar

Lifer
Oct 9, 1999
28,510
0
0
Originally posted by: notfred
Originally posted by: Czar
Originally posted by: notfred
Originally posted by: RyanSengara
Well neither of them are really better than eachother. ASP works on Windows based platforms, while PHP works on Linux based platforms. Essentially you can do exactly the same things with them, so they are equally as useful. But if you look in depth there are probably more LINUX(or linux based) servers out there so PHP might be a bit more useful in the long run...

I'd like it if you could explain to me what a "linux based' server is that doesn't actually run linux.
probably including bsd and other variants

BSD is not linux based.
I know, but I bet thats what he meant ;)... I think, could be that he meant that linux based is Red Hat, Caldera, Slackware and so on, who knows? dont even know why I'm trying to guess
 

Adul

Elite Member
Oct 9, 1999
32,999
44
91
danny.tangtam.com
php will run on windows has well. I have seen a few hosts run asp and php. Both have their uses and I think it is handier to know more then one just to be flexiable. :)
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: Ameesh
its total preference, i prefer ASP.net but you can do similar stuff in both.

:Q
Ameesh without a bad word about an Open Source project?!
 

yoda291

Diamond Member
Aug 11, 2001
5,079
0
0
From my last presentation in college:

In terms of coding, it's always just preference. Code what your boss tells you to code.

As far as server side, jsp/servlets are fastest following certain rules like you have to be executing from java byte code and you have to have enough concurrent processes running to outweigh the cost of loading the entire engine into the system at once. if you're only going to have 1-2 users at a time accessing the jsp, php is a tad faster.

php, for the most part, is faster than asp, though a few exceptions do exist.

ASP is the most flexible code, however, in that you can specify multiple interpreters, each taking slightly different amounts of overhead but you have incompatibility issues on unix based systems. It also seems to be the fastest option when using a windows based host as opposed to using a port of php or jsp to windows.

perl is the fastest bar none in single requests, but the overhead you incur when you have many simultaneous requests hitting the server is dramatic and is totally dependent on how good the kernel is at creating and destroying processes as opposed to the actual script interpreter.

As you can see, it's really just pick the technology that fits your need. On a windows host, it looks like you'd want asp. On a unix host, it looks as if you want to avoid asp. For small numbers of requests or if execution time is particularly important as opposed to initial response time(like on an intranet), perl is good. php seems to be the general winner overall. JSP/Java is preferred on systems expecting large numbers of requests.

A few extra things:
Windows hosts are generally more expensive, I imagine, because of licensing issues with IIS and/or the general difficulties associated with bringing unix native programs to the windows platform like perl or apache and their maintenance and I think that the unix kernels are somewhat faster, but have no evidence to support this.

JSPs seem to be the language of choice for designers(as opposed to coders) as a jsp can be done as html with static calls to code that the designer never has to know about. ASP also has this ability with codebehind. You can kind of do it with php using includes, but that presents a security risk sometimes.

All the above is also subject to human error. IE, a very poorly implemented perl setup will have longer execution time than any of the other technologies despite the efficiency of the interpreter.

We got a 'A' on this presentation, so I assume we weren't completely off our rockers.

In terms of my hyper-biased, opinionated view, php is better than asp.
 

Descartes

Lifer
Oct 10, 1999
13,968
2
0
I abhor both PHp and ASP. I've spent far too much of my time swimming through endless seas of marinara in spaghetti code.

ASP.NET or JSP/Servlets is a far superior solution. Of course, preference means little if you absolutely have to work with PHP/ASP. In this case, I would be very preferential to ASP.
 

manly

Lifer
Jan 25, 2000
13,286
4,060
136
yoda291,

You may have gotten an 'A' but there are quite a few weak points in your summary. I'm surprised Descartes didn't (peacefully) rip you up like he normally might. :p
 

ProviaFan

Lifer
Mar 17, 2001
14,993
1
0
Well, I hope PHP is ok, because I just got "PHP and MySQL Web Development" and started reading from it (I'm in chapter 2 now). The thoughts of having to use (and stay up to date on patches for) IIS to get ASP(.net) support make me tend to generally stay away from it.

<-- running Apache and MySQL on Windows 2000 Pro.