php vs asp

  • madmonk
  • Mastermind
  • Mastermind
  • madmonk
  • Posts: 2115
  • Loc: australia

Post 3+ Months Ago

which is better in terms of performance? php or asp ?

Personally, I have not used asp before.
comments?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Moses08
  • Graduate
  • Graduate
  • Moses08
  • Posts: 196

Post 3+ Months Ago

PHP has basically replaced ASP. Therefore I would say PHP.
  • rtm223
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1855
  • Loc: Uk

Post 3+ Months Ago

I saw some performance tests between the two a few months back, which suggested that in certain circumstances PHP was significantly better performing than ASP. I think the review may have been a tad biassed though lol.

I think general concensus is that php is marginally better performing, and marginally more secure than ASP. It's also not made by microsoft
  • Carnix
  • Guru
  • Guru
  • User avatar
  • Posts: 1098

Post 3+ Months Ago

This isn't an apples to apples question.

ASP and PHP are designed to natively run on different webservers. To run PHP on an IIS server, you have to install it seperate, so ASP will always be a better choice. If you're on Apache, PHP is the way to go. Any ASP module for Apache will likewise suffer performance issues over PHP. Microsoft applications prefer other Microsoft applications whenever possible, so if you're using a MS platform, you're probably better off sticking with it and making sure your firewall and VS software are all good and hardened. If for no other reason, because at least you don't have to troubleshoot interoperability problems that ALWAYS crop up between stupid MS servers and anything not MS.

I am more or less as proficient in both. I prefer PHP to ASP in nearly every area except database integration. ASP's collection routines make database access so much more convienient than any other language I've worked with (except ColdFusion, but CF is just plain silly...).

However, using function libraries (some of my own code and some I've downloaded), I've built a handful of solutions that make data access componets every bit as easy as with ASP.

At my day job, I program in ASP. I work for a major non-profit, and we get millions (literally) from the Gates Foundation and Microsoft itself, including free software liscenses. So, we're a MS shop, period. I'm the only one here who knows anything about other technology because I was hired outside the normal IT channel (by our Marketing Dept).

In my freelance work, I generally use PHP. The couple dev companies I usually take freelance work though all host on some *nix system with Apache / PHP / mySQL. To me, PHP is a no brainer, unless you have no choice (defined as, I'm using an IIS server, I have to use ASP now... CRAP).

.c
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

Moses08 wrote:
PHP has basically replaced ASP. Therefore I would say PHP.


I'd be interested to see proof of that.
Last time I looked asp was alive and well. PHP is perhaps a bit more predominant, because it's a bit easier coding language, not to mention the fact that it's essentially free. Personally as I get more familiar with both of them, I find that I understand VB, which is what I use with ASP just about as easily as I do PHP -- admittedly I have a long way to go with both and still consider myself a beginner at best with both, but I don't buy into this statement.

I also agree with Carnix above.
  • _Leo_
  • Proficient
  • Proficient
  • User avatar
  • Posts: 279
  • Loc: Buenos Aires, Argentina

Post 3+ Months Ago

Last time I looked, 67% of webservers in the net were running Apache and 21.5% were running Microsoft web servers. As someone said here, usually Apache servers run PHP and IIS run ASP.

That's a survey over 50.5 millon servers on the net. The survey results are from http://news.netcraft.com/archives/web_s ... urvey.html

I don't know about PHP vs. ASP performance. I don't use ASP because:

1. ASP has no functionality by itself. You need a new COM DLL for every little task. (ie: sending a mail in PHP is a native function and you need a third party DLL for ASP)

2. ASP, as any other Microsoft tool is buggy.

3. ASP is not free nor open source. Which means I have no warranty I will be able to use ASP in the future.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

_Leo_

That is a bit better argument than Moses08 gave. However, I would still disagree with a couple points...In particular, number 3. Let me just say one word. Redhat. I don't expect that needs clarification. That alone invalidates point number 3.

I agree with you about lack of knowledge on performance, because I've never looked it up. However, I can tell you that my company recently had a company develop an application for some streaming video we wanted to make available securely for our customers. The code was written in .Net and XML, and yes with a couple .dll's thrown in... But it is incredibly efficient and oddly, there is minimal code involved, including the secure login. It may take me some time to get to where I can duplicate such code on my own, but I do know enough to understand what's happening as I read the code and I am encouraged to continue studying it.

Point 2 I can honestly say I've never seen. Not to mention the flexibility. I'm currently learning to code asp with VB because I'm simultaneously learning VBA for use with Access and it's easier...but you could just as easily code in javascript if you're more proficient with it.

I do think it isn't given enough credit. In regards to point 1, that may well be true, but I like Jmail, for example.

I still fall back to my primary argument. Regardless of which is better, there is no question that PHP is more popular, and I insist and will continue to insist that it is entirely because it is open source and it is free, and that gives would be programmers an opportunity to play with a language that is easy to work with and it won't cost them an arm and a leg. I for one, enjoy php and am working to code my own program using php and MySql and hopefully will make some money from it. But this I can tell you, if php and Apache cost the same kind of money that it does to have a Windows server and good accessibility to ASP support, this whole conversation would probably take a whole different turn.
  • eCommando
  • Graduate
  • Graduate
  • eCommando
  • Posts: 162
  • Loc: California, USA

Post 3+ Months Ago

I know a friend who wrote his whole web site in PHP but he prefers ASP. He thinks php is buggy.

He used PHP on his site because it's free and MYSQL works well with it. It's also more of a standard on the web. If you want to sell some script, almost every host support PHP.
  • _Leo_
  • Proficient
  • Proficient
  • User avatar
  • Posts: 279
  • Loc: Buenos Aires, Argentina

Post 3+ Months Ago

Well, we can split my post in two parts. The first one, is just Internet's reality. The second one, is why I do use PHP.

About point 3, I don't like RedHat, I used RedHat from version 5 to 7.1 (for bussiness) and I move to Debian a time ago. But, that's no the point, the point is, we are talking about using PHP on Apache and ASP on IIS. (I think I am not the onlyone who left the small portion of the market using Apache-ASP and IIS-PHP apart, at least for this particular dicussion). For that matters, ASP is not free nor open source. The fact is ASP is property of Microsoft Corp. I need the intelectual property of the technology being owned by and open source mind in order to have warranty of freedom :)

Quote:
Point 2 I can honestly say I've never seen. Not to mention the flexibility. I'm currently learning to code asp with VB because I'm simultaneously learning VBA for use with Access and it's easier...but you could just as easily code in javascript if you're more proficient with it.


You are right, BUT, the same goes for PHP. You can learn PHP and Perl (almost the same) and, as Perl syntax was taken from C, you can learn C. Javascript has taken its syntax from C too, so learning PHP is useful.

And finally, point 1 I am confident about that one. Just take a look to the function list in PHP manual, then tell me ('cause I don't really know) how much of that functionality is built-in ASP and how many DLL's will you need to add to get the same power. And don't forget, third party DLL's, even when can give you the same functionality, using it implies additional charge, resources and a new company to
fight with.

Anyway, I won't tell you "don't use ASP". I'm talking about why I don't use it. There will be certain circumstances when you (or I) will have to use ASP and it will be the best solution for the case. But, for me, it will be just a few cases, most of the time I will chose PHP.

The best tool is not the best solution all the time.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

_Leo_ wrote:

The best tool is not the best solution all the time.


heehee...now that's an excellent summary statement I can completely agree with.
  • Carnix
  • Guru
  • Guru
  • User avatar
  • Posts: 1098

Post 3+ Months Ago

_Leo_ wrote:
1. ASP has no functionality by itself. You need a new COM DLL for every little task. (ie: sending a mail in PHP is a native function and you need a third party DLL for ASP)


Not exactly true. I don't like using plugin DLLs because of potential memory leaks, so I write my own VBScript classes (or download and rewrite) to avoid that. ASP has plenty of builtin objects for 95% of anything you need to do. The DLL plugins just make things easier. As for e-mail. CDONTS.NewMail is an out of the box feature of ASP (for as long as I remember, and I suppose that would be ASP 2.0; it's up to 6 now as of IIS 6 / Win2k3).

_Leo_ wrote:
2. ASP, as any other Microsoft tool is buggy.


Every peice of software is buggy. In maybe 8 years of doing ASP code, I think I have run into, I think, 1 actually bug that I couldn't find a solid workaround for. 6 years of doing PHP, I think the count would be more like 4 or 5, though as I recall, every bug in PHP and ASP was fixed in later releases... The adage it's a feature not a bug isn't just a joke. Sometimes software just isn't designed to do things the way you think it should...

_Leo_ wrote:
3. ASP is not free nor open source. Which means I have no warranty I will be able to use ASP in the future.


ASP.NET is pretty open source, go check it out. MS is keeping the core source code, of course, but the .NET developer network is pretty damn open these days. It's not as open as GNU (and the like) programmers' work, but it's also only been around for a couple years, where Open Source has been cooking for a longer time.


Again, I'll reiterate, I prefer PHP. But I find that there is a lot of bashing of this MS thing or that one, where the basher doesn't really have that much experience with the thing s/he is bashing. I can give you a laundry list of things I hate about MS (technology-wise... don't get me started on business ethics...). But I could do the same with PHP, Apache, mySQL or probably any other major Open Source software that I've used.

.c
  • _Leo_
  • Proficient
  • Proficient
  • User avatar
  • Posts: 279
  • Loc: Buenos Aires, Argentina

Post 3+ Months Ago

ATNO/TW wrote:
_Leo_ wrote:

The best tool is not the best solution all the time.


heehee...now that's an excellent summary statement I can completely agree with.


:D
  • madmonk
  • Mastermind
  • Mastermind
  • madmonk
  • Posts: 2115
  • Loc: australia

Post 3+ Months Ago

interesting discussion here. :lol: some good points made too. perhaps diffenet scenarios/ work call for different applications.

Quote:
saw some performance tests between the two a few months back, which suggested that in certain circumstances PHP was significantly better performing than ASP. I think the review may have been a tad biassed though lol.


I think we are most interested in seeing some unbiased testing between the both of them. i have read some reviews on php, asp but are biased.

In those reviews, php seems to be the better performer.
  • Carnix
  • Guru
  • Guru
  • User avatar
  • Posts: 1098

Post 3+ Months Ago

madmonk wrote:
I think we are most interested in seeing some unbiased testing between the both of them. i have read some reviews on php, asp but are biased.

In those reviews, php seems to be the better performer.


I would love to see a solid benchmark test. But again, the results will always be biased based on server platform. ASP on Apache will probably always be slower than PHP. But PHP on IIS will probably be slower than ASP. See, the normal way you install PHP on IIS is as CGI. You can do it as an ISAPI object too, but it's really buggy that way. ASP is ISAPI, which on IIS is generally always faster than CGI because of the way data is processed.

I guess if someone put a lot of thought into it, a benchmark test could be run, but there would have to be some statistical normalization done, to even out the fact that the platforms themselves play favorites. It's possible, but it would require a level of effort I'm not really interested in putting into it. Doing ASP in IIS and PHP on Apache, but recommending PHP/Apache/mySQL whenever asked, is a fine approach as far as I'm concerned.

.c
  • rtm223
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1855
  • Loc: Uk

Post 3+ Months Ago

Maybe get the two "groups" and compete them against each other:

Apache, PHP, MySQL vs IIS, ASP and MSSQL

(assuming MSSQL is the database of choice for ASP :? )

I guess they could devise some benchmark tests but I think to many people have favourites, and the people that care most about benchmarks are those who already have favourites. I think those people who are indifferent as to which they use wouldn't have so much interest in benchmarks as the fanatical followers of one or the other.

The performance test I saw was arguing that the COM system was the thing that slowed everything down in ASP, but I don't really know what that means :lol: and, as I said - it was on a mostly PHP-fan site.
  • Carnix
  • Guru
  • Guru
  • User avatar
  • Posts: 1098

Post 3+ Months Ago

rtm223 wrote:
The performance test I saw was arguing that the COM system was the thing that slowed everything down in ASP, but I don't really know what that means


COM == "Component Object Model"

There's also DCOM (D for distrubuted). It's the same idea though. It sort objectifying ASP. Build your COM objects, which are basically DLLs written in whatever language you want (traditionally, this was C++ or VBA), then ASP had a build in structure to make use the those objects. You had to build an API into your objects, of course, but more-or-less it's STDIN STDOUT sort of stuff.

The problem is, most of the free COM objects you download tend to have memory leaks and will crash IIS over time, since IIS has a really hard time with garbage collection, unless there are 0 active sessions... find for a smaller site, but on my organization's site, I doubt there's been a zero session point for a month... plenty of time for IIS to crash under even a small memory leak (the DLLHOST process for our site always runs at nearly 200MB of memory anyway... but then our site is extremely well traffiked).

ASP.NET has vastly improved everything about ASP across the board. There are new issues, like it's considerably more complicated, but in terms of performance, the .NET system blows standard ASP away. At this point, it's unlikely that non-MS-style developers have done any serious work with .NET yet, although there will always be exceptions.

I always feel strange... guilty? Dirty? Hypocritical? when I find myself in the position of defending MS technology... heh. I just think it gets a bad rap sometimes, although some of that is well deserved. There are definitely WORSE things you could do than implement a fully MS network.

.c
  • madmonk
  • Mastermind
  • Mastermind
  • madmonk
  • Posts: 2115
  • Loc: australia

Post 3+ Months Ago

Quote:
Maybe get the two "groups" and compete them against each other:

Apache, PHP, MySQL vs IIS, ASP and MSSQL

(assuming MSSQL is the database of choice for ASP )


-excellent idea :lol:

and nice explanation on COM.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

Actually if it's available to you the SQL Server 2000 is a bettter choice than MSSQL. I use both and SQL 2000 is significantly easier to manage in my opinion. (I suppose this assumes you use a Windows server also) The Advantage to MSSQL is if you have Office 2000 Pro or some such flavor, it comes with it at no extra charge, although it is not installed by default.
  • Rabid Dog
  • Web Master
  • Web Master
  • User avatar
  • Posts: 3245
  • Loc: South Africa

Post 3+ Months Ago

Having worked exstensively in PHP and ASP I found that the strong dimensioning requirements for arrays in ASP tends to disallow alot of creativity in your coding. The Microsfot Solution has some fantastic features (ADO being one of them) but I still tend to lean the way of PHP.

Not because it is Free but because it allows me to code freely. I don't take very nicely to hard and fast rules and I like to stretch the boundries and see how far I can take a piece of code before it falls over.

I just get the feeling that Microsoft didn't take ASP as far as they could have but it seems they have done a realy number with C#. I am looking forward to getting my teeth into that.

Anyways the point I am trying to make is this - Neither language has significant performance difference on a correctly configured server, they both have favourite OS's and favourite DBMS's.

To say one is better is unfair, just find the one that works for you.

PS - I think it was on PHP.net that I read " ...theoretically with PHP you should be able to write a web server... "
  • Carnix
  • Guru
  • Guru
  • User avatar
  • Posts: 1098

Post 3+ Months Ago

ATNO/TW wrote:
Actually if it's available to you the SQL Server 2000 is a bettter choice than MSSQL.


I was taking MSSQL as either a typo or a mis-abbreviation for mySQL or MS SQL Server... but... are you refering to MSDE 2000?

Anyway, MSDE is superior to Access, but that's about it. If you can choose, choose MSDE if you don't have SQL Server. SQL Server and Oracle are pretty much the top of the line systems, but then, that's why they are several thousands of dollars.

Many people will argue that mySQL is on par with those system, but that's really just silly. Where you would be right in that assersion is in the fact that for probably 85% of database integration work, mySQL is more or less as good since it, like all descent relational databases, follow some core SQL standards. Where the really significant database servers, like SQL Server and Oracle, really shine are in the other extended SQL functions, like nested SQL statements, shorthands, etc. Nested SQL is really pretty cool...

SELECT * FROM table WHERE something=(SELECT * FROM anothertable WHERE something=something)

It's hard to wrap your head around that if you've never done it... It took me a while to figure it out as well. My org's donor database runs on Oracle, and for some reports, I've written 25, 30 line (sometimes longer) SQL queries that span 20 different tables...

So... the point is, mySQL is in the upper middle tier of database systems. It's really good, but there are better and it's by far not the worst you can do. However, as I'm mentioned in other posts, always pick your technology based on your requirements. Sometimes an Access database will actually do it for you... or even a flat CSV file.

.c
  • Rabid Dog
  • Web Master
  • Web Master
  • User avatar
  • Posts: 3245
  • Loc: South Africa

Post 3+ Months Ago

Carnix wrote:
Many people will argue that mySQL is on par with those system, but that's really just silly. .c


I would have to agree with you on that one, unfortunately mySQL is not as strong as MS SQL. Although it does support alot of features that no one has really seen (besides the people that go digging).

I find it is pretty strong but when it comes to rapid deployment Microsoft is superior

Post Information

  • Total Posts in this topic: 21 posts
  • Users browsing this forum: demonmaestro and 170 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.