Home Log In or Register Forums

PHP versus ASP

Home > Forums > It And Computing > 'PHP versus ASP'
'PHP versus ASP'
Page: [1] [2]
richard's user image
richard
25.03.2004 - 12:05
forum administrator
Now I've used PHP and ASP a fair bit now and I believe each make good languages for very different reasons.

PHP is very feature rich. Can you think of a function that might be useful, such as something that encrypts strings, or connects to databases or manufactures images on the fly? Chances are, someone's already written the function and it's there already in the build. This is fantastic. I can't think how many times now I've wished for ASP to have a much bigger native function library.

However, I actually think this is also a downside. Consider the fact that it takes roughly 1000 times as long to execute and deliver a server-side script web-page than it does to simply send a plain old-fashioned html page. This is because the server must parse the server side script every time it's called and interpret the script. This is slllooowwww....

Now. Considering that ASP and VBScript doesn't actually possess many native functions, this forces developers to create their own DLLs which the ASP script files simply call. You can write an ASP fully dynamic page with two lines of code:

1) Create an instance of your DLL
2) Call the 'ProcessPage' function of that DLL.

Simple. Easy. Fast. It's elephant.co.uk

You can do anything you can do in an ASP page in your DLL, you can still call Response.Write to write to the web-page and you can access all the Session and Form and Application objects. The only difference is that you are doing so in compiled code. In a proper IDE.
richard's user image
richard
25.03.2004 - 12:07
forum administrator
Now ASP.NET will be even better, since it actually will compile the .aspx web-pages for you! This will be very nice, but still not as nice as putting all your script into a DLL.
nelson's user image
nelson
25.03.2004 - 12:32
forum administrator
Ok, Rich, I don't really have much time right now to write in length about advantages/disadvantages of ASP/PHP.

Let me just be lame and write my (well-thought-through, really) conclusions:

- PHP beats plain ASP hands down. It's faster (really!), can do anything you want (yes, it even links into Win32 DLLs - if you wish), it has tremendous expansion libraries with community support (PEAR), it is (well, it can be) object oriented, will run on a multitude of web servers and platforms, is more stable and secure. I will even dare say it's easier to install than ASP (IIS is a bitch and you need to move heaven and earth to get it to even send a simple email)

- ASP.NET is a completely different story. Very structured. C# is really good. Excellent at interoperability and component-making. I think it probably compares favourably with Java. It does suffer from MS-specific-ness, though. Biggest problem is how deeply it ties to Windows with thing like security, so it's a no-go for cross platform stuff. Still, it's really good.

Personally I prefer PHP but I do acknowledge that ASP.NET is probably "better" for enterprise-class stuff (PHP is much simpler to use for smaller projects). Plain ASP is a lame dog, though.

(note: on the speed issue, PHP really is fast even if interpreted - although there's several free PHP accelerators that cache compiled pages and give an extra speed boost)
richard's user image
richard
25.03.2004 - 12:39
forum administrator
Yeah I agree that plain ASP is pretty damn slow in comparision (didn't realise PHP was *that* much better though), but when you shift most of the logic out to a DLL, it's pretty good.

Having said that, if PHP can link to DLLs anyway, there's not likely to be that much of a difference.

So... any idea why BH is so slow? Do you think they've stuck us on a box sharing with Google or something??
nelson's user image
nelson
25.03.2004 - 13:03
forum administrator
It's not PHP - I think that maybe something else is sucking the cpu on the machine at periodic intervals. Either that or the network connection they have sucks arse.

It's also possible that they have PHP set up in a stupid way; and other sites on the same machine are hogging it. Or it's IIS. Dunno.
nelson's user image
nelson
25.03.2004 - 13:07
forum administrator
Erm, Rich, isn't elephant.co.uk running PHP? It certainly looks like it.
deathjester's user image
deathjester
25.03.2004 - 13:16
forum administrator
so far far far far awaaayyyyyy over my headdddd


i HATE interweb technology
arar's user image
arar
25.03.2004 - 17:45
Will code HTML for food.
richard's user image
richard
26.03.2004 - 06:41
forum administrator
Hahahahah, that elephant.co.uk reference had nothing to do with PHP, although looks like it backfired on me :o))

You never seen the TV adverts? It's simple, it's easy, it's fast, it's Elephant.co.uk!
richard's user image
richard
28.04.2004 - 16:57
forum administrator
I think our site *is* hosted on IIS. It's certainly on Windows Server 2003, so it would be silly to run Apache on that I guess.

Still, we shall be looking at other hosting options when this current one expires
Page: [1] [2]

You must log in to post messages on this board. If you don't have a username and password, you can register quickly to get them!

contact us © 2003, 2004 BurningHorizons.net