Forum Moderators: coopster

Message Too Old, No Replies

PHP vs. ASP

         

andrewsmd

8:09 pm on Jan 13, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Besides PHP being cross platform, are there any other advantages to using PHP over ASP? I have not done a lot with ASP, but the little I have seen it looks like you can implement it easier via the client side. Are there any other reasons why so many people use PHP instead of ASP? Just an open ended question.

Demaestro

8:22 pm on Jan 13, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



ASP tends to have a larger code base size.

Being cross platform is a huge thing though. Being able to pick up your site and drop it on any updated web server is a huge plus.

Also I could be wrong here but if you have a server that compiles asp don't you have to have some type of VB license? If so that is a cost that isn't needed. Again I am unsure of how that works as I have zero IIS/ASP hosting experience. The only time I have used ASP was in school.

andrewsmd

8:37 pm on Jan 13, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, cost is a big factor. I use both ASP and PHP at work, I just never saw the advantage of ASP. But of course, I am a procedural kind of guy and not a OOP kind of guy. I have heard that PHP didn't have a lot of OOP functionality until PHP 5. One advantage I have come across is some people say the VB style of code in ASP is easier to read but personally
for(x = 0; x < 10; x++){
code
}

makes more sense than

for x = 0 to 10
code
next

Please keep in mind I am not trying to start an argument. I was just wondering if anyone has any thoughts as to why go ASP over PHP.

[edited by: andrewsmd at 8:37 pm (utc) on Jan. 13, 2009]

cameraman

8:37 pm on Jan 13, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You wouldn't implement ASP client-side; ASP is server-side (that's the "S" in aSp ;) ). You may be thinking vbscript, which is client-side.

Last I heard, the internet was 80% Apache. ASP is a Microsoft technology for Microsoft IIS running under Windoze. Disappointingly, you can install modules to run ASP under Apache, but it's not a native implementation, per se, and snottily, I don't understand why anyone would want to corrupt a perfectly good apache installation with M$ crap.

Not snottily, it's basically just a different path - Go with microsoft and use .net et al or go with non-microsoft. In my ever so humble opinion, there's a reason that apache/mysql/php dominate the web, most notably, reliability.

When I first started getting into the server side of things I did ASP with Access, but I hit brick walls with what I could do with them pretty quickly. There were things I just couldn't do unless I wanted to write IIS server modules. I changed tracks to php and mysql and haven't hit any brick walls yet; I think that was about 6,7 years ago.

PHP is a descendant of C, which flows a whole lot more easily through my brain than BASIC or its descendants. I think it's a whole lot more versatile than ASP, and if you do actually run across something that it can't do, you can likely do it in perl, ruby, or python, which you can pick up a lot more easily coming from C/PHP than from BASIC/ASP.

andrewsmd

8:39 pm on Jan 13, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Maybe I'm confused about ASP then. We have sites that are in aspx and I can execute code on a checkbox check or off focus of a textbox.

cameraman

10:07 pm on Jan 13, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I just looked at a wikipedia article on it. Likely the aspx files are ASP.NET, and apparently ASP.NET != ASP
...these files typically contain static (X)HTML markup, as well as markup defining server-side Web Controls and User Controls where the developers place all the required static and dynamic content...

I didn't examine the article in detail, but I gather it's a bit of a hybrid sort of thing; you specify which parts you want to run server-side and which are client-side.

andrewsmd

10:26 pm on Jan 13, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yea that sounds more like it. I didn't know asp.net was different than ASP. I am a PHP man anyways, I just wondered if there was any other reasons people went with ASP besides the Microsoft capabilities it has.