[Mono-list] asp.net or php

Roberto Jimeno rjimeno2003@yahoo.com
Wed, 21 Jan 2004 09:13:36 -0800 (PST)

Another short answer for your question is:

1.- In C# objects must be declared in order to be
used, so typos are detected, while with PHP this
wouldn't be an error, and therefore PHP is more prone
to this kind of mistakes.

2.- In C# the "=" operator (to assign) does not
evaluate to boolean "true", so there is no risk of
writing "while($a=$b)" while what you actually meant
was "while($a==$b)"; a mistake which often happens
with PHP.

AFAIK it is possible to use languages with .NET which
do not check for this "=" vs. "==" thing but at least
Mono requires this to be checked since at this point
Mono's XSP defaults to C#.

Now ... that was only the short answer, because the
next few paragraphs are the long answer, which I plan
to turn into a small presentation to show to some of
my mates here at the office:

As it was mentioned before, ASP.NET has better
object-orientation when compared to PHP 4 (i've heard
that this will no longer be true for PHP 5) and also
that ASP.NET is "compiled" versus a "non compiled"
PHP.  With all though respect, I'm not completely sure
about whether this is actually an advantage or not;
furthermore I'm not even sure whether this is true or
not. Allow me to explain:

While clearly ASP.NET compiles its scripts and
produces temporary files containing binary files as a
result of the compilation process, PHP also compiles
the scripts. In contrast to ASP.NET, regular PHP does
not produce any binary file nonetheless PHP is
compiled prior to it's execution. By the way Perl is
also a compiled language and so it is Java even though
the code produced can be interpreted by Perl itself,
the JVM or mint in the case of Mono.

Although I've never run some benchmarks myself, I
guess   ASP.NET should perform better than PHP (among
other things) due to the fact that ASP.NET "catches"
the binary files so the scripts don't have to be
compiled every time an .aspx page is served. The only
way (I know) PHP could do something similar would be
using an ad-on sold by Zend precisely to perform this

Other point I think should be considered when
comparing PHP and ASP.NET is that of source code vs.
no source code. ASP.NET applications can be
distributed as a bunch of .aspx and .dll files whereas
with PHP applications are mostly a bunch of .php
files. In a more concise way the diference is that PHP
requires to show the source code, while ASP.NET does

I hope this is of some use to you.

--- Alejandro Sánchez <alejasanch@yahoo.es> wrote:
> what are the advantages of asp.net over php?
> -- 
> Alejandro Sánchez
> e-mail: alejasanch@yahoo.es
> jabber: shalmak@jabber.org
> _______________________________________________
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list

Roberto Jimeno

Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes