Forum Moderators: phranque

Message Too Old, No Replies

PHP vs ASP .NET

         

havoc

11:33 am on Aug 4, 2003 (gmt 0)

10+ Year Member



Hey there ,

I am a bit of a php nut , lately my friend who is a well lets say windows programmer is trying to get me to swap over to asp.net . Since i don't know much about asp.net whats the advantanges and disadvantages of it , which do you think is better and why?

Thanks :)
Karl

sharbel

12:55 pm on Aug 4, 2003 (gmt 0)

10+ Year Member



ASP.NET is a full object oriented programming language. It's compiled code, which runs a lot faster than ASP or PHP. It's much more robust than ASP and PHP.

If you want to compare PHP, you should be comparing to ASP.. as they are in the same league IMHO. ASP.NET is in a different category than ASP/PHP.

Gesh I hope this doesn't turn into "My platform is God, and yours sucks"..

Anyway, you can go to [asp.net...] and read up.. go to the Tutorial tab if you want to see the Quick Start tutorials.. they are pretty good.

Btw, ASP.NET is able to run on Linux now.. www.go-mono.com has the C# compiler done and working.. starting to see some Mono web-hosts too. Thats pretty neat :)

havoc

1:14 pm on Aug 4, 2003 (gmt 0)

10+ Year Member



interesting ... i will haveta look into it i guess :)

panic

10:41 pm on Aug 4, 2003 (gmt 0)

10+ Year Member



I think I'll just have to disagree with sharbel on this one.

The main reasons I choose PHP over ASP is :
1) PHP is WELL documented
2) PHP has MySQL functions (MySQL is godly)
3) PHP can be run for practical/everyday use via command line (not sure if ASP can or can't)
4) PHP runs smoothly with Apache (I use a ton of Apache modules)
5) PHP code is similar to Perl, which is like 100 times easier to read logically than ASP/Visual Basic.
6) IIS sure has had a lot more exploits than Apache (keep in mind that ASP is essentially written for IIS)

And yes, I know you can run PHP as CGI on IIS but it's just not the same... it's not meant to be.

-panic

sharbel

12:21 am on Aug 5, 2003 (gmt 0)

10+ Year Member



heh I would choose PHP over ASP as well.. but if you read the thread we were talking about ASP.NET :)

panic

12:53 am on Aug 5, 2003 (gmt 0)

10+ Year Member



Call me crazy, but isn't the title is of this thread is "PHP vs ASP .NET"?

-panic

korkus2000

1:03 am on Aug 5, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



1) PHP is WELL documented - Microsoft is working on that. It is new.
2) PHP has MySQL functions (MySQL is godly) - Write your own object in ASP.net.
3) PHP can be run for practical/everyday use via command line (not sure if ASP can or can't) - I am really not sure about command line. Why do you want that?
4) PHP runs smoothly with Apache (I use a ton of Apache modules) - ASP.net runs smoothly with the IIS and .net framework. There are many modules that work on IIS that are like the apache ones. You can recreate almost anything on windows that you have on apache.
5) PHP code is similar to Perl, which is like 100 times easier to read logically than ASP/Visual Basic. - C# is like C and Java which makes it very logical. You can also use many other languages VB, javascript, and python.
6) IIS sure has had a lot more exploits than Apache (keep in mind that ASP is essentially written for IIS) - This is true.

ASP.net is on par with jsp and really not PHP. It has its problems like it being slow the first compile and bigs since it is new. People will be living to exploit it also since it is microsoft. It intagrates with client side software and makes it a very desirable application technology.

[edited by: korkus2000 at 1:05 am (utc) on Aug. 5, 2003]

sharbel

1:04 am on Aug 5, 2003 (gmt 0)

10+ Year Member



Call me crazy, but isn't the title is of this thread is "PHP vs ASP .NET"?

Hmm yes.. do you understand there is a difference between ASP and ASP.NET?

lanzaman

10:16 am on Aug 5, 2003 (gmt 0)

10+ Year Member



Both languages have their own merits, I can develop in both, although most of my work at the moment is PHP / MySQL which is strange, having come from an ASP / SQL server background.

My question would be do you need to learn both or can you do everything you want with PHP.

If you are a web developer who needs to be able to do both, to get additional work then learn both. For example I recently picked up a new client who has an existing site built using ASP and I wouldn't have got the work if I couldn't use this language.

It is therefore important to me, to be able to develop in any language, it also gives me the ability to look at a completely new project and decide which solution would work better.

As always with any language, it also boils down to how comfortable and competent you are with a language, I am quite sure that there are many programmers who can do things with PHP that some ASP.NET programmers can only dream aout.

Easy_Coder

1:11 pm on Aug 5, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Isn't PHP a single threaded application versus the multi threading that the .net framework supports.

SethCall

2:06 pm on Aug 5, 2003 (gmt 0)

10+ Year Member



asp.net is new and hot, and it is the first truly compartmentalized coding style for web pages, but I am not sold on it yet. Actually, I really dont like the way they've done it... and also, we have noticed alot of quirky behavior with asp.net, as in, pages maxing out the cpu of the server, or taking forever to load (well thats normal for the first request of the page once the server boots)

now, the remoting interface IS godly, make no mistake of that.

For small projects, I beleive php can increase development time, but for large ones, you will wish you used asp.net.

One thing that SUCKS about asp.net is the runat="server" crap as well as that variable that always comes down to the page... the one that holds all that state info.. they invalidate the page which I can't be happy about.

Easy_Coder

2:59 pm on Aug 5, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



--> the one that holds all that state info..

you should be able to set your EnableViewState to false to limit the size of the __viewstate field.

panic

7:25 pm on Aug 5, 2003 (gmt 0)

10+ Year Member



korkus2000,

1) PHP is WELL documented - Microsoft is working on that. It is new. It should be well documented, ESPECIALLY if it's new

2) PHP has MySQL functions (MySQL is godly) - Write your own object in ASP.net. No thanks. :D

3) PHP can be run for practical/everyday use via command line (not sure if ASP can or can't) - I am really not sure about command line. Why do you want that? File manipulation accross various files, putting files into multiple directories at once, and a ton of other stuff that doesn't need an HTML front end, or a front end at all, for that matter.

4) PHP runs smoothly with Apache (I use a ton of Apache modules) - ASP.net runs smoothly with the IIS and .net framework. There are many modules that work on IIS that are like the apache ones. You can recreate almost anything on windows that you have on apache. Again, why re-create the wheel? You've got people charging like 100 bucks for a mod-rewrite module for IIS, when it's completely free for Apache

5) PHP code is similar to Perl, which is like 100 times easier to read logically than ASP/Visual Basic. - C# is like C and Java which makes it very logical. You can also use many other languages VB, javascript, and python. You mean to tell me it even comes close to the ease of PHP?

-panic

aspdaddy

8:06 pm on Aug 5, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>Isn't PHP a single threaded application versus the multi threading that the .net framework supports

Well does anyone know - does asp.net (as opposed to the .net framework) support multiple threads of execution?

SethCall

3:16 am on Aug 6, 2003 (gmt 0)

10+ Year Member



setting EnableViewState to false doesn't remove it from the HTML : ( which causes invalidation.

Pretty silly to me

bilalak

5:52 am on Aug 6, 2003 (gmt 0)

10+ Year Member



ASP.NET is new and going up.
The problem is not with the syntax of the language or the features. The major problem is with the framework perfromance over the Internet. It has many good ready off the shelf objects to manipulate a lot of tasks.

Though, it is VB like and most Computer developer are towards C like (PHP, PERL, CGI..) or Java like (JSP...).

It comes with a cost of learning a totally new pltaform and a totally new syntax. No body has proven that this would be beneficial yet. .NET was not well accepted in the market yet.

It comes with a cost for putting up a server and running it. Few companies would like to pay that much in this recession.

It comes with a cost for monitoring the server because if a compiled script locked the server, it would be hard to trace down like pure text.

However, .NET compiled scripts are fast to load as out of process and in fact they are on the rise. If you have ASP, I suggest going for C# or J#.

Luck

Easy_Coder

1:34 pm on Aug 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



aspdaddy

--> does asp.net (as opposed to the .net framework) support multiple threads of execution?

Yes, asp.net supports multithreading programming with the System.Threading namespace.

I was more interetested in this issue from an application perspective. I can't find any documentation that indicates that the PHP Application(engine) is indeed a multi threaded application which depending on the project it might be in your best interest to steer a customer to a more powerful architecture soley for performance reasons and not language preference reasons.

I've read in this thread that PHP is well documented. Where can I locate documentation regarding the PHP Application Architecture?

Easy_Coder

1:46 pm on Aug 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



bilalak
-->It comes with a cost for putting up a server and running it. Few companies would like to pay that much in this recession.

I downloaded the .net framework free via windows update and it is running side by side with my asp/vb6 applications on a production level IIS 5 box. So far it's cost us nothing to start using .Net.

bcolflesh

2:10 pm on Aug 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't really want to get into the "mine is better than yours" sissy-boy slap fight, but....

I've read in this thread that PHP is well documented. Where can I locate documentation regarding the PHP Application Architecture?

It's very simple:
faqts.com/knowledge_base/view.phtml/aid/10410/fid/28

And that's why it's the most popular:
php.net/usage.php

You won't be seeing .NET at those numbers - ever...

So far it's cost us nothing to start using .Net

Uh-oh, all those MS dev apps (and pre-built .NET objects) and the OS didn't cost you anything? Don't tell the BSA!

;)

korkus2000

2:21 pm on Aug 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think we are running away with why PHP is better than ASP. PHP is not .Net. What you can do in .Net really is not in PHPs scope. You can write stuff into PHP to try and get the same stuff, but you would really be trying to reinvent JSP.

Does PHP output html based on the browser inherently?
Can you port your PHP code right into a client side app?
etc, etc.

PHP is great for do regular server-side stuff. All these aurguments are great for why you use PHP over ASP, but not .Net. .Net is not a competitor of PHP. When PHP upgrades to have the equivalent functionality of JSP and ASP.net then there can be a comparison. It is like comparing VB and C++. You can do the same stuff, but one is more functional by design.

You won't be seeing .NET at those numbers - ever...

If all I need to do is go in and out of a database, I am not sure I would use .Net. The power is for large scale functional apps. It really will have draw backs as a basic server-side language. You can do it and people are, but I don't think I will.

jatar_k

2:26 pm on Aug 6, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



korkus is exactly right (not that he needs my help, he's a big fella, you wouldn't catch me arguin with him ;))

I'm staying out of this one, to each their own, right tool for the right job and all that. It also just tires me out to have the lang1 vs lang2 conversation again.

bcolflesh

2:35 pm on Aug 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I agree with Korkus (and have started .NET development just to keep myself "in the loop") - but I'll take a stab at those 2 questions:

Does PHP output html based on the browser inherently?

Does any language? .NET doesn't, it has to use an object (maybe it's built in now - is that what you mean?) that tries to detect what's being used and what it has enabled - just like the BrowserHawk object for classic ASP.

Can you port your PHP code right into a client side app?

Sure - with the PHP-GTK:
gtk.php.net/

Easy_Coder

6:00 pm on Aug 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm not attempting to bash php. Php obviously offers many features that allows a developer to rapidly deploy a web application.

My only question is regarding the Threading Model of the PHP Application. Is it a multithreaded application?

bcolflesh

6:37 pm on Aug 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



My only question is regarding the Threading Model of the PHP Application.

How could the PHP app have a threading model? If you're talking about the server's threading model - many PHP developers use Apache - info here:

httpd.apache.org/docs-2.1/

Do a search for "threading".