[KLUG Members] PHP vs ASP

Russell Dillenburg members@kalamazoolinux.org
Mon, 11 Nov 2002 15:29:40 -0600 (CST)


Kewl, lots of good replies on this.  I created a set of php pages to be 
viewed in my AIM profile.  It accesses my xoops (www.xoops.org) database 
and pulls the web links, and downloads to be displayed.  If you want to 
see how it works check buddy info on "Nitehwk207".  must have aol instant 
messenger.  Eventually I'll post the source to my website.

On Mon, 11 Nov 2002 adam@morrison-ind.com wrote:
> >a)  Variable scoping.
> . . .
> >PHP's just goofy -- but in a somewhat good way.  You have global variables,
> >but to access them have to pull them into scope with the 'global' keyword
> >when in functions.  That's kind of nice, when you're working on a team of
> >people who don't know -NOT- to pollute the global namespace, but when you're
> >working on a team of sane individuals it's more of a nuisance. 
> 
> Globals bad.  PHP's pass-by-reference is also very nice, particularly when using
> objects. 
> 
> >b)  Data types.
> ....
> >in either Visual Basic or Visual C++ together.  Anything remotely complex
> >should be pulled out into a COM component where you can use a "real"
> >language.  Because of this everything in VbScript is a "VARIANT" type which
> >is really a big C union.  You get a "type" flag and a "data" set for each
> >variable.  Why they took a tightly-typed language like C++ and made
> >everything untyped is beyond me.  
> 
> A morons version of XDR?  COM is supposed to be language and platform
> independent,  it isn't, but originally was thought it would be.  This union
> method makes it easy to map values of different types, etc... between disparate
> languages and such.  But there certainly are easier more transparent ways.  One
> must remeber how old COM is.
> 
> >c)  Short-circuited conditionals.
> >This is a major pet-peeve of mine.  Vbscript won't short-circuit a
> >conditional which prevents me from writing stuff like:
> >Do Until (rs.EOF() AND rs.Fields("ProductID").Value <> lngLastProductID )
> >	' ... stuff
> >Loop
> 
> What! OMG!  That clinches it, VBscript sucks.
> 
> >e)  Database access.
> >Tie, almost.  PHP gives you the low-level DB access calls if you need them,
> >but it's not a good idea to use them.  You'll shoot the "portability" of your
> >project in the foot.  Better off going with ADODB which is based off MS's ADO
> >that you'll use alot in VbScript.  PHP wins here though simply because it's
> >underlying datatype doessn't do the brain-damaged things that VBScript does
> >when you get back a NULL.
> 
> Yes, the PEAR libraries are fantastic.  When you start using PHP, investigate
> them right away.

What are PEAR libraries?  Sounds like something interesting.

> _______________________________________________
> Members mailing list
> Members@kalamazoolinux.org
> 
> 

-- 
Russell Dillenburg
Computer Systems Specialist
webmaster@russell.knightec.net
A.A.S. CIS Programming

Programming Languages: Java, C, C++, Perl, PHP, VB, Javascript, VBScript
Operating Systems: Unix, Windows, Mac
For more of my skills see my resume at http://russell.knightec.net/xoops

"Will code for food!"