[thelist] PHP? ASPNet?

Michael Kimsal michael at tapinternet.com
Thu Jun 6 14:37:09 CDT 2002


Amazon Paulo wrote:

>>Another thing to keep in mind when comparing the 2 (ASP.NET and PHP), is to
>>keep in mind that the 2 main langauges that Microsoft wants you to use with
>>ASP.NET (Visual Basic.NET and C#) are both strongly typed languages. You
>>must declare each variable as well as it's primitive data type or object
>>reference. This is a good thing in my opinion, but with Jay on this one, I
>>prefer to program in PHP! It's much less verbose and faster to develop
>>
>>
>with.
>
>IMO, the worst problem about ASP (I don't know PHP) is the fact that it
>allows the programmer not to declare variables and objects. The fact that
>you don't need (and, in fact, cannot) specify the type of a variable is
>awful. Error handling is also terrible in VBScript.
>
>
Error handling isn't all that great in PHP either, but is sufficient for
most situations.

If you *want* to be told to declare variables in PHP, you can set the
error reporting level
to a high state, and it'll spit out warnings whenever you use an
undeclared variable.  If you
prefer to be able to create variables ad-hoc, without warnings, that's
the default.  *Should*
be enough flexibility to please both camps, but because the warning are
off by default,
most people never know about them.

I've written about ASP/PHP in many forums over the years, and it will
most likely
come down to a religious or pragamatic issue.  If you're already
comfortable with ASP,
probably stick with it.  If you know Perl, PHP isn't too much of
stretch.  However, if you're
used to using a lot of CPAN stuff, PHP may not be for you because a lot
of the
more advanced CPAN modules don't have equivalents in PHP yet.

ASP.net is a step towards ASP taking care of many more mundane issues for
you (web forms, for example) but it seems to me that it may be locking you
in to a specific method of doing 'templating'.  I've not seen any good
examples
about how you'd do a good templating system in ASP (or ASP.net) that
would allow you to switch templates at runtime to accomodate various styles
(high bandwidth, text-only, palmpilot, etc).  If anyone has any good
tutorials on that,
let me know - I'd love to be proved wrong.  :)  PHP, on the other hand,
makes it
very easy with it's 'include' function.  INCLUDES are still not part of
VBScript
after how many years?  You accomplish INCLUDES via SSI, meaning you can't
conditionally include something.  ASP3 somewhat lets you do this with
'server.execute' but it's a strange workaround, imo, and leads to weird
memory usage
issues.

Dunno if that helps much or not.  :)

Michael Kimsal
http://www.logicreate.com
734-480-9961





More information about the thelist mailing list