[Mono-list] asp.net or php
Wed, 21 Jan 2004 10:40:59 -0700
Just to get everyone's opinion, how interesting would it be to make PHP a =
.NET-enabled language with Mono?
>>> Roberto Jimeno <email@example.com> 1/21/2004 10:13:36 AM >>>
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 "=3D" operator (to assign) does not
evaluate to boolean "true", so there is no risk of
writing "while($a=3D$b)" while what you actually meant
was "while($a=3D=3D$b)"; a mistake which often happens
AFAIK it is possible to use languages with .NET which
do not check for this "=3D" vs. "=3D=3D" 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=E1nchez <firstname.lastname@example.org> wrote:
> what are the advantages of asp.net over php?
> Alejandro S=E1nchez
> e-mail: email@example.com=20
> jabber: firstname.lastname@example.org=20
> Mono-list maillist - Monoemail@example.com=20
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
Mono-list maillist - Monofirstname.lastname@example.org=20