Forum Moderators: phranque
Thanks in advance.
Marshall
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
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.
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.
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' :)
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.
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.
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!
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.
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...
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.