Asp preferred over Php? Why?

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
User avatar
Sindarin
Forum Regular
Posts: 521
Joined: Tue Sep 25, 2007 8:36 am
Location: Greece

Asp preferred over Php? Why?

Post by Sindarin »

Since I recently graduated and got into web development, I had no experience with Asp.
I got right into Php and I like it because it is a very flexible and easy language in contrast with asp which is
all vbscript.

However many people still prefer Asp over Php while not stating their reasons for doing so.
I have encountered clients who talked about wanting their site have "asp dynamic elements"(!) while just referring to a mere contact form. When I told them this could be done with Php, they just replied
"Php? No, I don't want anything less, I want asp dynamic pages".

So I want to ask, why some people prefer asp over php? Is asp compatible with Linux servers?
Should Php go on and change the name into something with better meaning?
User avatar
Maugrim_The_Reaper
DevNet Master
Posts: 2704
Joined: Tue Nov 02, 2004 5:43 am
Location: Ireland

Post by Maugrim_The_Reaper »

ASP.NET (presumably) and PHP have had a long history of misconceptions. I think the .NET is compiled argument has been running for so long, nobody has a clue what "compiled" means for each anymore. In any case it's very difficult to find an unbiased comparison of PHP and ASP.NET. I would definitely qualify this post as biased towards PHP in some way! :)

As with any competition between languages, you have advocates on both sides, and usually a ton of others who don't really understand the differences but stick to whatever they started with, prefered, or ended up following out of peer pressure. Social pressure on a language can be amazing at times - witness how many Ruby developers also tend to be Mac enthusiasts ;). It that pure coincidence or peer pressure kicking in?

In your case, it could be easier to explain. Chances are you're meeting clients with Windows servers. Once you have a Windows server you end up bound by a few soft rules - PHP is slower on Windows (no longer as of a few days ago), ASP.NET is faster, PHP is not supported by Microsoft, ASP.NET is, and so on. It's not that surprising then ASP.NET gets shown a strong preference at times - even if a client can't explain exactly how it benefits them. This is just the most obvious possible explanation - I'm sure there exists plenty of developers familiar with a lot of languages and just prefer ASP.NET (or any of its siblings over the CLR). Probably the CLR is another reason often mentioned.

Is ASP.NET compatible with Linux? Sort of the big question - it's not designed for Linux (you are tied to Windows), but you can give Mono a shot which is a free open source implementation of the .NET Framework for Linux/BSD/Windows/Mac. It should be supporting .NET 2.0 soon, and .NET 3.0 has a separate project...I think. As you can guess, Mono trails .NET by quite a margin in terms of implementation - so you have to wait quite a bit for Mono to catch up. Still - it does work.
Should Php go on and change the name into something with better meaning?
Don't see why - PHP has so much visibility at this point that a name change would be confusing. Also, it's an open source projects - not sure you could ever get enough agreement to change it's name from the community.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Asp preferred over Php? Why?

Post by Christopher »

Sindarin wrote:So I want to ask, why some people prefer asp over php? Is asp compatible with Linux servers?
Should Php go on and change the name into something with better meaning?
Well the fact that Microsoft spends more money advertising .NET than the net worth of all PHP companies combined has a little to do with those perceptions. You might want remind your clients that they are getting their facts from Microsoft and it will cost them money down the road to do so. It just requires education on the benefits -- like the fact that PHP runs on Unix or Microsoft servers, but .NET only on on Windows, etc. The goal of those limitations is ultimately to force you to spend money somewhere that you probably would not have spent it using a open systems.
(#10850)
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Post by califdon »

I agree completely with arborint. Just wanted to add that, all the complex analysis aside, it usually boils down to which Operating System is in use. Yes, it's possible to run PHP on a Microsoft OS, but in practice, if the server is Microsoft, you're going to find ASP and/or ASP.NET being used; if the server is Unix/Linux, you're going to find PHP/Perl/Python being used. Or Java for either OS. To begin with, they were designed to work together, and no doubt the programmers will know the language that is native to the OS they are using. Most web developers that I know are either Windows or Linux oriented and only work in the environment that they are most familiar with. It's a lot more work to become fluent in both, and not very many people try. There's plenty of jobs available in both, I'd say.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Sometimes companies make decision based on expense. Some companies see PHP and that it is free and jump on the open source bandwagon without really knowing what it entails.

Some companies see everything Microsoft carrying a price tag and figure since it costs something it might be better because where there is an expense there is usually a phone number to call when all hell breaks loose.

The simple fact is in a Windows environment, on optimized hardware with optimized settings, ASP/ASP.NET will generally work better than PHP in that environment. In *nix, PHP blows Microsoft out of the water since Microsoft can't swim in the vast expanse of the *nix world. ;) Well, not without some help anyway.

Ultimately the decision of what platform to work on will lie in what systems you have in place at the time. If you are Windows house you are more than likely going to go with ASP. If you are *nix house, more than likely you are going to go with something like PHP, Perl, Python or Ruby.
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

You can use PHP under ASP.NET if you use Phalanger ... http://www.php-compiler.net/doku.php ... then the client need never know that their 'dynamic active server page' is actually a PHP script.
User avatar
Sindarin
Forum Regular
Posts: 521
Joined: Tue Sep 25, 2007 8:36 am
Location: Greece

Post by Sindarin »

Don't see why - PHP has so much visibility at this point that a name change would be confusing. Also, it's an open source projects - not sure you could ever get enough agreement to change it's name from the community.
Ah I just read in wiki that PHP was renamed to its recursive initialism, I thought PHP was still named after "personal home page". :D
You can use PHP under ASP.NET if you use Phalanger ... http://www.php-compiler.net/doku.php ... then the client need never know that their 'dynamic active server page' is actually a PHP script.
8O oh good!
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

I didn't know anyone still called it that or referred to it by that moniker. For a brief bit of history's sake, the progression of the name, I believe, went from "Personal Home Page tools" (PHP) to "Personal Home Page tools/Forms Interpreter" (PHPFI) to "PHP: Hypertext Preprocessor" (PHP). I think.
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

It was changed to PHP: Hypertext Preprocessor after it was adopted. Originally it was Personal Home Page, and a pseudonym is People Hate Perl :p
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post by alex.barylski »

People Hate Perl...hahaha...nice :)
Post Reply