Forum Moderators: phranque

Message Too Old, No Replies

ASP or PHP?

Which one for a new site?

         

HughMungus

12:06 am on Mar 25, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Operating system is not a consideration (I can get either Linux or Win).

Which one would you choose and why?

encyclo

12:33 am on Mar 25, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



When you say ASP, do you mean old-style ASP or ASP.NET?

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.

HughMungus

2:28 am on Mar 25, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks encyclo,

Just thinking outloud here. Want to add more features to an existing site. I have some (old school) ASP experience and I'm wondering if there's an advantage to learning PHP over ASP at this point (since things change rapidly and what was once great might now be just passable).

sdani

2:35 am on Mar 25, 2004 (gmt 0)

10+ Year Member



We use both.
php / MySQL comes for cheap. ASP.nET is powerful. We use php / MySQL to store tons of data and to serve simple pages to our users and clean URLs to crawlers (Mod Rewrite).
When we need complex pages.. those are usually made just for users (and not crawlers), so we send the user to www2 / www3 server, which are created on asp.net. (All php / asp servers are shared web hosting accounts here).
Reasons for using php / mysql are simple, but so far the reasons why we use ASP.net:
1. Allows us to compile the code in DLL and we can hide the code which we think is very important piece of code.
2. We can run multithreaded program in asp.net, which I don't think can be done in PHP.

There may be better reasons for choosing one over the other, but these are our reasons.

Thanks
SDani

danieljean

3:30 am on Mar 25, 2004 (gmt 0)

10+ Year Member



I don't know why anyone today would consider ASP. The only alternative to the .Net framework is J2EE, which can be run on several different OSes and servers.

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.

dvduval

4:54 am on Mar 25, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This post is definitely what I would call flame bait. You will find people with strong opinions on both sides.

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.

blaze

4:56 am on Mar 25, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I haven't tried ASP.net .. how good is it?

How automatically can you build dynamic websites with it?

txbakers

3:41 pm on Mar 25, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Which is better a red apple or a green apple?

HughMungus

5:16 pm on Mar 25, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



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?

delboy1978uk

5:20 pm on Mar 25, 2004 (gmt 0)

10+ Year Member



php is for linux and asp win is that right?

if so consider this....

people don't even blink when you tell them your windows crashed

yet jaws drop if your linux machine packs up

txbakers

5:28 pm on Mar 25, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



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.

delboy1978uk

5:30 pm on Mar 25, 2004 (gmt 0)

10+ Year Member



that's my linux mad friends fault for making it out to be that way

you must admit though, windows DOES crash

and THAT's not funny either

dvduval

5:31 pm on Mar 25, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



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.

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

7:25 pm on Mar 25, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



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!

bakedjake

7:33 pm on Mar 25, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



HM: This is a little OT, but maybe relevant nonetheless. Since DBs were brought up:

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.

Mike_Levin

6:28 pm on Mar 28, 2004 (gmt 0)

10+ Year Member



I'm an ASP Classic programmer. I've been trying to make the move to ASP.NET for a long time now. Fair warning: ASP.NET is very different from ASP Classic. ASP.NET is intended for Visual Basic and Object Oriented programmers who are making the move to the Web, and not for ASP classic programmers who want something more powerful. As powerful as ASP.NET is, be prepared to unlearn everything you knew about the Web, and send yourself back to school.

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.