ASP vs PHP

Started by
36 comments, last by granat 22 years, 9 months ago
Uhhh no..not another vs thread..... Well I want to know what ASP does better than Php and what Php does better than ASP... What do you prefer and why ?
-------------Ban KalvinB !
Advertisement
Well, as I''ve never used ASP I can''t really compare them. The reason I started using PHP is that that was the langauage I used for a project in a database course, then I started using it at home, then at work... So it pretty much just kept going, I can tell you this, though. PHP has the best online documentation I''ve seen for any language or program ( ok, so I''ve mostly used msdn, I''m easily impressed =) ).

Anyways, I plan on trying ASP sometime, so if you decide to use, please tell us what you think of it.

------------------
It''s me again!
PHP is a lot like C. ASP has some evil connection with VB Script. Also, getting ASP working on a Unix based server is next to impossible (the only software that I know that does it costs a whole lot).

[Resist Windows XP''s Invasive Production Activation Technology!]
PHP because it is free, open source, and very easy to code in.
-----------------------"When I have a problem on an Nvidia, I assume that it is my fault. With anyone else's drivers, I assume it is their fault" - John Carmack
quote:
ASP has some evil connection with VB Script.


What connections wold that be...?

quote:
Also, getting ASP working on a Unix based server is next to impossible (the only software that I know that does it costs a whole lot).


You''re probably thinking of Chili!Soft ASP. But there is at least one other implementation of ASP: Apache::ASP. You can download it for free and it''s released under the GPL. Of course, it doesn''t have an implementation of VBScript, which probably makes it rather useless to most people... but hey, it''s ASP.

I''m reminded of the day my daughter came in, looked over my shoulder at some Perl 4 code, and said, "What is that, swearing?" - Larry Wall
I'm reminded of the day my daughter came in, looked over my shoulder at some Perl 4 code, and said, "What is that, swearing?" - Larry Wall
I am new to ASP, but I am coding in it, thats what they pay me for so, I must .
Honestly I would use PHP for personal use, even though I dont know any PHP, for the reasons Maximus pointed out, comes with apache and is easy to set up on IIS (all you do is run a setup.exe file).
Now the reason Null and Void says ASP has an evil connection with VB Script, is because it Does!!! you can code Asp eighter as java-script or VB Script, this script runs on the server, is easier to code in VB Script and since ASP and VB Script are both Microsoft''s, you can pretty much say ASP is Server side VB Script, it relies a LOT on ActiveX too for DB connection and more.

I dont know about Apache::ASP, can you code in it with VB Script? VB is copyrighted by Microsoft, I highly doubt they would give a licence to implement VB Script to Apache for free.

my 2 cents
Ok, I just saw the Apache::ASP Page, and well seems like in Apache ASP what you do is code ASP with perl as the scripting engine, ONLY perl, this means if you want to make your pages cross platform, you are better off with PHP, or code ASP with perl, but this involves installing perl on your Windows Server and figuring out how to make IIS ASP run perl Scripts.

hmmmm you can just have perl cgi files for that matter.

I have to plug my choice here: JSP.

Unlike ASP where you have a limited set of script commands at your disposal, it allows you to use the full Java programming language from within your JSPs.

Check out The Jakarta Project . You can use Tomcat as a stand-alone web server or use it to work alongside Apache or IIS just to handle JSP and Servlets.

It also allows you to define custom tags which link to compiled servlets makeing seperation of code from content pretty interesting

Seeya
Krippy

Edited by - krippy2k on June 19, 2001 11:54:16 AM
Well, I have to put in my bid for ASP.NET (which just released Beta 2).

ASP.NET is totally different than ASP. It's a completely compiled arch, must faster, and is language independant. You can use any/all .NET language you want (VB, C#, Managed C++, JScript, COBOL.NET, etc).

If you'd like to see some ASP.NET samples, try the IBuySpy examples. They have a Store and a Web Portal designed in ASP.NET with a SQL Server backend, and they have fully downloadable source.

The main advantage of PHP is that it is designed around perl for a unix platform. So if you know Perl and only have a Unix server, then PHP is a good target. If you've got Windows server then ASP with some Background Logic COM DLLs would be your best bet. Both are useable, and both technologies have been used on some major sites (PHP: Slashdot, sourceforge, anything by VA Linux. ASP: Buy.com, Microsoft.com, GameDev.Net)


Epolevne

Edited by - Epolevne on June 19, 2001 12:10:40 PM
Ok. Speaking as someone who used to do ASP for a living...

They''re fairly similar, except:

- I think the database connectivity is a little more complex under PHP. However, this is because it supports direct connections to a lot of databases without using intermediate ActiveX objects or whatever. ASP has a few different yet simple ways of doing it, although it''s hard to find good explanations of the differences. Bear in mind that once you''ve got your database connectivity nailed and encapsulated in a function, you shouldn''t have to worry about it again anyway.

- PHP, I believe, offers you one language, whereas ASP offers technically unlimited languages. (Via the Windows Scripting Host, I believe.) Most people just use VBScript, which is the default. You can use JScript just by putting @language = java-script (or something like that) at the top of a file, and many people might find it better to work that way. I did a whole mini-shopping site in java-script for ASP. But of course, few people use java-script for ASP so getting support might be tough. And a few features are harder to use (for example, checking if a QueryString is empty is awkward under java-script, easy under VBScript.)

- ASP had a few bugs when I used it. Some of these problems get reported on boards everywhere and no-one knows how to fix them. Stupid things like "Unspecified error C0008000." or words to that effect. I searched the MS Knowledge Base and every online ASP forum I could find, and there were lots of people getting such errors and hardly anyone managing to find an answer. At least with PHP, if there is a problem, you know it is getting worked on all the time, the developers will listen to you, and at the very least you can see the source code for yourself.

- Continuing on from a couple of points above... the people using PHP tend to know more about what they''re doing. Whereas ASP people tend to be less knowledgable, using MS components for data access or whatever without understanding what it all means. A lot of the VBScript/ASP examples I see on the net show some poor programming practice, and most (although not all) of the people on the forums are clueless. Quite often, if you ask how to do something, answers from ASP users tend to be "No, I didn''t do that, I did this instead". But that is just my general feeling, you might find it is different.

Hope that helps.

This topic is closed to new replies.

Advertisement