Forum Moderators: phranque

Message Too Old, No Replies

Better: asp/asp.net vs php

Not personal preference - which IS better?

         

Marshall

6:56 am on Sep 6, 2007 (gmt 0)

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



I know this question ranks up there with things like MAC vs PC and HDDVD vs BLUERAY, and so on, and a lot has to do with personal preference/experience. That aside, and the obvious things aside like asp and asp.net has to be run on a windows enabled server where php does not, which provides the better functionality? I ask because I have been using asp over the years and lately started doing some things in php: newsletter sign-ups, message boards, etc., and while I am pleased with the performance and am slowly learning, I really do not see the big difference. So I would really appreciate input from those who know.

Thanks in advance.

Marshall

steve

10:55 am on Sep 6, 2007 (gmt 0)

10+ Year Member



I moved from asp to php and I agree there is little difference. There is a big difference between .net and php.

I spent some time trying to get to grips with .net, but it's a steep learning curve, for my small simple sites I realised I could do everything I needed quicker and easier with php.

A few differences I found:

1) There is a much wider range of free php scripts available.

2) Not a language issue, but apache via htaccess is much better than IIS for redirects etc.

3) php is 'quick and dirty' - short cuts are easier. Variable types aren't strictly enforced, is that an advantage or disadvantage :-)

4) php isn't tied to expensive server software!

5) At some point Microsoft will kill asp, I think php will be around much longer.

As a self employed site owner I'm happy with php. Lots of big sites seem to be moving to IIS, so if I was working for someone else in a commercial environment I'd learn asp/.net

Drag_Racer

11:07 am on Sep 6, 2007 (gmt 0)

10+ Year Member



I don't think language is the issue here. My language of choice is perl. Is it better than php or asp? I don't care. what I do care about is it platform independent. Perl and php are where asp and .net are not.

Steve, I must suggest you do worry very much about your variables. I code my perl scripts in strict and taint mode always. I don't know what the same is for php, but it must be there. Do some reading on it please. If you don't like to use a browser with security holes, make sure your cgi enviroment is safe as well.

wedmaster

12:20 pm on Sep 6, 2007 (gmt 0)

10+ Year Member



asp.net power for the studio tool,and easy working with others.
asp.net just like ak47,php just like snipe gun. asp.net is weight,php is light.but which one is better? i think the same of them.the best way is you can control both of them.so,
in the future,you can run it in the windows or linux as you like. don't you that is real freedom?

Gibble

2:21 pm on Sep 6, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There's really no right answer.

If php had an IDE as good as Visual Studio I'd probably use it more.

But, .NET 2.0 truly sped up my development and I've been moving more and more towards it.

Both languages are very powerful and I can't think of any limitations of either that would put the other out front.

As someone mentioned, since PHP typically runs on apache, and .NET doesn't, you have the powerful .htaccess file and it's rewrite abilities. But with .NET, you can do the same thing with httpModules, and you get to do it in .NET, not the web server.

So, like I said, whatever works best for you.

AussieWebmaster

2:56 pm on Sep 6, 2007 (gmt 0)

10+ Year Member



asp has more built in security.... php requires a lot of work to be fully secure

ceestand

3:15 pm on Sep 6, 2007 (gmt 0)

10+ Year Member



ASP.NET > PHP > ASP

ASP.NET is leagues and bounds ahead of the other two. A lot of PHP's strengths are not necessarily from the server language itself, but from other factors such as Apache being better (for lack of a word) than IIS, the PHP community, cost...

ogletree

3:27 pm on Sep 6, 2007 (gmt 0)

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



asp.net is great if you are in a big hurry and could care less how much code bloat you have. ASP.NET is just front page or visual basic on steroids. If you go MS be prepared to throw lots of hardware at it. I think you can do asp.net efficiently but you have to really know what you are doing. PHP is very easy and there are tons of resources to get help. Lots of forums and example code out there. It is very easy to find a php guru to help you. It is hard to find somebody that really knows asp.net.

pageoneresults

3:34 pm on Sep 6, 2007 (gmt 0)

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



It is hard to find somebody that really knows asp.net.

Job Security.

There's a lot going on in the asp and asp.net communities. Don't be led astray by all the negative stuff you here, it is all relative. Some will tell you php is the best, and I might agree. Others will tell you that ASP or ASP.NET are best, and I might agree there. It will all depend on the client requirements. My clients just happen to be Windows folks. Someone has to help them keep up with and/or surpass the Jones' :)

Marshall

3:39 pm on Sep 6, 2007 (gmt 0)

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



Let me put this question to all of you:

You have three identical pages - same images, text, layout, CSS, etc. One is generated using asp, one asp.net and one php. WIll one perform better than another say in loading times, SE results, and the like?

Marshall

ogletree

4:18 pm on Sep 6, 2007 (gmt 0)

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



That would depend on many factors. A simple page would be the same. You would have to do a lot of different tests to find out. I would imagine that it won't always be just one. One might be better in one area than the other. There is no hands down winner.

Also you forgot coldfusion.

Gibble

4:31 pm on Sep 6, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You have three identical pages - same images, text, layout, CSS, etc. One is generated using asp, one asp.net and one php. WIll one perform better than another say in loading times, SE results, and the like?

SE results shouldn't matter, a page is a page, regardless of how it's rendered.

Loading time, could vary, but it has little to do with the language it's written in. More the caliber of the programmer.

I want to say the .NET page would be the quickest since it's a compiled language. But the overhead of IIS and memory usage, that won't necessarily be true.

ceestand

4:50 pm on Sep 6, 2007 (gmt 0)

10+ Year Member



Well, neither technology will affect SE results, but two words come to mind with ASP.NET: output caching. By keeping a copy of reused itms on the page, it should be faster.

pageoneresults

4:58 pm on Sep 6, 2007 (gmt 0)

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



Also you forgot coldfusion.

Now that would be the Ultimate Job Security.

More the caliber of the programmer.

Definitely! Not only that, you have to consider the quality of the technical aspects too. Apache does have a heads up on us Windows folks there. But, we do have a few tools available to us that give us the same capabilities, they just aren't as well known as mod_rewrite or mod_whatever. You nix folks have all sorts of mod_s available to you.

Better will be the one that produces the best result for the visitor, human or not.

johnblack

5:19 pm on Sep 6, 2007 (gmt 0)



None of them are inherently better - which is what the OP asked. ASP.NET has advantages over asp and vice versa without even dragging php into the equation.

You have to look at what you need from your website before making that kind of decision.

Someone mentioned there being a lot of free php scripts around yet I've seen a lot more .Net open source code available recently. MS have the free Express dev environments available so you don't have to spend lots of money on Visual Studio to get going.

However I feel much more comfortable with php as a server side language than C# or VB yet I know there is a lot of functionality within the .NET framework that I haven't even thought about and certainly wouldn't have a clue as to how to program it in php.

But php does give you the apache and htaccess advantage.

As always depends on the requirements of the website.

BTW

ASP.NET is just front page or visual basic on steroids.

not sure where that came from!

rocknbil

5:54 pm on Sep 6, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The biggest advantage to using perl, php, or other languages over asp is portability. As one who frequently has to move sites for customers, this is a Really Big Deal. It's pretty easy to move a perl-based set of apps from a Windows-based server to just about anything else, this is not true of asp scripts, it has to be re-written.

The portability factor extends to interaction with other applications as well, for example, database interaction (MSSQL server - ACK!) or interaction with external "plug-in" programs.

My personal beef is that it's proprietary, and avoid proprietary foundations for the above reasons.

matt900

6:01 pm on Sep 6, 2007 (gmt 0)

10+ Year Member



I was a long time in-house ASP developer, but switched to PHP when I was doing my own thing, to keep things cheaper. PHP also has much more of a community to get help from.

Want to do something faster/better in PHP?...do a search and someone is probably freely sharing their faster/better solution.

Want to do something faster/better in ASP, or ASP.net?...do a search and pay someone to help you make it faster/better.

That's just the way I found things...

ceestand

6:04 pm on Sep 6, 2007 (gmt 0)

10+ Year Member



That's a really good point, rocknbil. For a given site, or programmer, it might be more of a matter of choice, but if you're choosing from a professional standpoint, the openness of PHP would seem to win out.

For example, In my day job I work with .Net, so I'm partial to that when doing side projects. However, my side projects are reasonably small so I'm fine with shared hosting. However, I am currently learning LAMP, because when I do get to that bigger project, I don't want to pay for my own Win/MSSQL licenses for a rack-mount.

ogletree

7:46 pm on Sep 6, 2007 (gmt 0)

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



plentyoffish is done in asp.net