Forum Moderators: phranque
Between traditional ASP and PHP, you can toss a coin or argue for years - they do much the same job equally efficiently. ASP.NET is powerful stuff, and is an interesting possibility for sites which require its depth and complexity - but it could be overkill for a small project.
The choice really relates to other factors - if you're familiar with one language more than the other, or if you know one but want to learn the other. Linux servers tend to be cheaper, and security is generally easier, Windows servers tend to be easy to set up, there are more tools, etc. You should look at other factors too: for example, do you want to rewrite URLs? If so, mod_rewrite is a must, so you need Apache (and consequently PHP, because I don't think ASP runs under Apache in Windows, only with IIS).
Also, why not JSP, or Python, or Perl?!
I think you should decide on the other factors first, and use the language needed as a consequence of those decisions.
There may be better reasons for choosing one over the other, but these are our reasons.
Thanks
SDani
If the job is simple PHP is fine, with either MySQL or Postgres if you need solid enterprise features.
Since you did learn ASP, PHP should not be really easy for you.
PHP is available on many more servers than ASP.net.
There are more free PHP scripts available than ASP.
PHP 5 is about to be released, with many new features.
Hiring a programmer to write PHP is generally less expensive.
Those are my reasons to go with PHP, but I can respect the "other side" because there are some benefits to ASP as well, but I'm more a PHP fan.
This post is definitely what I would call flame bait. You will find people with strong opinions on both sides.
No. Since I haven't designed a new site from scratch in a while, I thought I'd see what the advantages are to PHP over ASP and vice versa. One example is that I know that with ASP, I don't have to be able to do a lot of server modifications for things to work so cheap virtual hosting is better. Can the same be said of PHP?
php is for linux and asp win is that right?
This is so wrong it's not funny.
ASP is native to windows, but with SunOne installed can run on virtually any platform. I've even seen an ASP installation available for the AS/400.
PHP can run on Windows very nicely, as can JSP and Cold Fusion.
Right now the only exclusively Windows technology is ASP.NET and that might be available on NIX platforms soon as well.
Can you design a site from scratch with minimal server configuration and use cheap virtual hosting with PHP?
Absolutely! As a matter of fact, the average cost for PHP hosting is less. And if you throw a database into the picture, it is less expensive to host mySQL that MSSQL.
But it could still be argued that there ARE cheap windows hosting packages also and that ASP can use mySQL or Access also.
Bottom line: there are more sites hosted on Linux, and for that reason, there is more available for the Linux/PHP/mySQL combination than with windows.
HughMungus, I probably could have explained my position better. I certainly didn't mean to point the finger at you. What I'm saying is I have seen MANY discussions both here and at other forums that were never ending arguments with no clear winner.
NP
Can you design a site from scratch with minimal server configuration and use cheap virtual hosting with PHP?Absolutely! As a matter of fact, the average cost for PHP hosting is less. And if you throw a database into the picture, it is less expensive to host mySQL that MSSQL.
But it could still be argued that there ARE cheap windows hosting packages also and that ASP can use mySQL or Access also.
Bottom line: there are more sites hosted on Linux, and for that reason, there is more available for the Linux/PHP/mySQL combination than with windows.
Good info. Thanks!
If you're doing a lot of data import and transformation, you'll find the wizards in MSSQL invaluable. There are data transformations available to MSSQL that I couldn't dream of doing with the open-source DBs without a ton of hassle and additional programming.
It's a big deal to me, so I just thought I'd mention it.
Back to the languages:
I still believe that ASPs "hit-the-ground-running" time is a lot less than PHPs. Contrary to what many think, ASP can be extremely streamlined. ASPs ADO integration is far superior to what any of the free languages DB connectivity offers.
Out of the box, PHP is more powerful when it comes to direct network connectivity. PHP has many more stable modules available (a lot of ASP components I've tried are buggy - that's not a fault of ASP, just the developers of the components).
Basically, it comes down to the right tool for the job. For simple type websites that do simple DB access and have a couple of forms, tx is spot on: Do you like red or green apples better?
It may come down to a hosting platform choice - ASP is natively written for Windows, so it'll run better there. PHP will run better in an Apache Unix enviornment. That's not to say that you can't swap them, but since there are more people running in those native configurations, support and bug identification/swatting will be faster.
To maximize your options from the start, just make sure you do all your querysting parameters with the mod_rewrite trick. That way, you will never expose .asp or .php filenames, and you can remain technology agnostic. Flip a coin, choose one, and know that you could port to the other at any time with no impact on your URLs.