Skip to main content
GameDev.net gamedev.net
🔒 Locked

ASP v PHP

Started by denethor Feb 18, 2003 at 3:07 PM 11 replies 650+ views
Original Post
denethor
denethor
Which is better, especially for e-commerce?
kressilac
kressilac
Neither are really better, though ASP does provide you an upgrade path to ASP.NET which is a significant upgrade in performance and flexibility.

For non .NET applications and web services that are not .NET enabled, PHP or ASP will serve you equally well. There is abundant sources of components for either language as well.

Kressilac
Derek Licciardi (Kressilac)Elysian Productions Inc.
Julio
Julio
I''ve heard of a lot of security issues with asp. maybe they fixed some of that with asp.net.

My Homepage
My HomepageSome shoot to kill, others shoot to mame. I say clear the chamber and let the lord decide. - Reno 911
Solo
Solo
I haven''t used ASP.NET so I can’t say much for or against it. Having said that, my opinion is PHP kicks the crap out of ASP, and is very well suited for e-commerce development.
// Ryan
Michalson
Michalson
quote:
Original post by Julio
I''ve heard of a lot of security issues with asp.


Where from? Where any of them real, or just people who "heard" it somewhere.

quote:
Original post by Solo
Having said that, my opinion is PHP kicks the crap out of ASP, and is very well suited for e-commerce development.


What would you list as the pros and cons, and the ultimate reason you believe "PHP kicks the crap out of ASP".


quote:
Original post by denethor
Which is better, especially for e-commerce?

What is the company running, and which are you more confortable with? Ease of development/maintence should be your main concern, as the speed/performance of ASP/PHP is negligable when compared with other server tasks that are started by scripts, like SQL queries (the speed of which depends on your database, not your scripting language). The only way your script code is going to make a noticable impact on speed is if you specifically write bad code (such as writing a "SELECT * FROM Table" and then using a loop to find a specific record), which is why you should pick which ever one is more natural for you.
Solo
Solo
The ultimate reason is probably best expressed by looking at the PHP Function Reference, but I also prefer the c like syntax over VB. I like PHP's session handling, and when combined with mySQL makes a very powerful (and free) platform for e-commerce.

Don't get me wrong, ASP is extendable and can offer most of the functionality provided by PHP, but usually at a price (either you find an ActiveX control provided by Microsoft, buy one, or develop one yourself).

Con's? Getting all of PHP's features working with IIS is problematic. In fact, the last time I checked, some were simply not available.

[edited by - Solo on February 18, 2003 6:33:46 PM]
// Ryan
konForce
konForce
I''ve been writing Intranets and some websites over the last five years, using ASP and PHP. Without a doubt, PHP is the better language. There is no contest there - anyone who uses both will come to that conclusion. (The only area that ASP is better in this regards is that the API is consistant.)

(Disclaimer here: I''m talking about "classic" ASP, not ASP.NET.)

Whenever I have the choice, I use PHP. My reasons are simple:

* PHP is a much better language
* PHP is much cheaper to host

I usually deal with small to medium sized businesses where spending $10-$50 a month for a good sized database and lots of bandwidth on a secure, stable system is a BIG factor. If you are developing a site for yourself, look around at what hosting companies charge for ASP + DB and PHP + DB support first. That may be enough to make up your mind.

Regarding the language, PHP''s philosophy is to package everything you need in the API. ASP''s philosophy is to package nothing, and force you to call out to various components.

For example, in PHP:

To send an e-mail you type: mail($to, $subject, $body, $headers);
To upload a file, you simply look at the $_FILES[''name''] array

In ASP both of those tasks are really only able to be done if you plug into an ActiveX DLL. Many times you have to pay more money (or rewrite the wheel) for every "extra" thing you want to do.

Neither approach is right or wrong, it''s a preference. I definately prefer PHP''s way though.

I take the viewpoint that PHP can do anything ASP can do (although it''s support for COM is not 100% complete yet), and a whole lot more. I definately like PHP''s way it handles variables, especially arrays.

I have found PHP to be more stable and faster. However, ASP is definately more secure. (After all, it''s rarely updated with new features and it doesn''t do much.) You may make a case that Windows / IIS is more insecure than Linux / Apache, but ASP itself is more secure than PHP.

Anyway, my opinion on PHP vs ASP was formed after *years* of working with both. I have never been frustrated by something PHP doesn''t do, which I cannot say the same with ASP.

Google and Yahoo uses PHP. That''s good enough for me.

PS: There is already work on PHP.NET integration too, so if that ever happens, you could use PHP on a .NET structure.
Lode
Lode
ASP means you''ll have not only to pay once, but for every new module you want, you have to pay again.
PHP is free and at least as good and has a more active community.

_____________
WINDOZE XP SI ?.??~!..
thona
thona
Ok, lets see.

(a) On WIndows with IIS, PHP is sadly SLOW compared to ASP.
(b) PHP is better than ASP - surely. It was designed many years after ASP, and MS was already working on ASP.NET when PHP was designed.
(c) ASP.NET beats the crap out of both - again, this is logical. New concepts etc., while PHP is basically "yet another ASP" (which is true, ASP was the original here - no, not JSP, JSP are an ASP clone). ASP has the same problem VB has - the origins go back a lot, and it was "first of it''s kind" in some sorts, which make the design "interesting" at times.

For the databases:
(a) PHP/MYSQL often has a price advantage. Stay away from these. By miles. The problem is not PHP - the problem is that MYSQL is a child''s toy. PERFECT for read only operations, but once you get ecommerce, you dont want to risk to loose some transactions becuase the DB crashes, you need the provider to be able to backup your db WHILE it is working etc. There are nice open source databases out there, but - well - they are often not supported. MYSQL takes some more time to reach reliability and ACID conditions of "real industrial databases". Again, fine for some content managment, fine even for the catalogue of a ecommerse shop (read only), but nothing I would ever put CC data on.
(b) go and look - there are providers out there allowing you to use ASP/ASP.NET plus a MSDE database for very little money.


Regards

Thomas Tomiczek
THONA Consulting Ltd.
(Microsoft MVP C#/.NET)
RegardsThomas TomiczekTHONA Consulting Ltd.(Microsoft MVP C#/.NET)
konForce
konForce
quote:
the problem is that MYSQL is a child''s toy.

I think some facts here are necessary to back up the statement. SQL Server is no doubt a more complete database than MySQL. In the same manner, Oracle is more complete to SQL Server. For nearly every task MySQL will be just fine.

If your business makes a lot of money and/or your life depends on 0% failure on your database, then you would be foolish to go with MySQL for the reason that no one has to take responsibility for it. I''ve personally had no problems with MySQL; neither have I had any problems with SQL Server.

Anyway, there''s no reason you cannot use a PHP+Oracle or PHP+SQL Server combination. So, even if you could prove that MySQL is a bad database, that doesn''t discredit PHP any.

quote:
why do you guys compare php to asp?

This is very true. I think for sake of this discussion ASP means VBScript, as in:

<%
Response.Write "Hello World"
%>

Regarding ASP.NET vs either PHP or ASP - the question again is even more along the lines of "which style do you prefer?". ASP.NET gears itself for the classic "enterprise" application complete with interfacing to abstract objects. This, however, may be overkill for the majority of real world applications. No single tool/technology/mindset is right for every job. (ie, In some areas a raw scripting langauge may suffice, in others it may not.)

I''m hoping that the PHP.NET becomes a reality. That way I can leverage the language I prefer to use in the environment that people are more likely to spend lots of money. Either way, there have been plenty of PHP jobs to keep me more than busy. If that ever changes, I''m more than willing to leverage other skillsets and tools that I have.

Lastly, if you are a good programmer, switching from things like ASP and PHP is not very difficult at all. So I really don''t think you can go wrong learning either.
Solo
Solo
quote:
Original post by thona

...the problem is that MYSQL is a child''s toy. PERFECT for read only operations, but once you get ecommerce, you dont want to risk to loose some transactions becuase the DB crashes, you need the provider to be able to backup your db WHILE it is working etc. There are nice open source databases out there, but - well - they are often not supported. MYSQL takes some more time to reach reliability and ACID conditions of "real industrial databases".



Dated information. The inclusion of InnoDB tables and the mysqlhotcopy script have solved those problems. The primary drawback is that these features are relatively new and therefore not as well tested. mySQL is also not as widely used as the more popular SQL databases and so, not as well proven.

Commercial licenses are available if support is needed.

quote:
Original post by thona
I have found PHP to be more stable and faster. However, ASP is definately more secure.



ASP allows a script to create any ActiveX object on the server. How could you possibly consider this more secure? What exactly makes PHP insecure?
// Ryan

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.