PHP and the web

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: David P. Schwartz
Date:  
Subject: PHP and the web
If you know C and/or C++, then you already know 95% of PHP.

I did a little ASP work a couple of years ago, and honestly couldn't understand how in the world most of the web sites actually WORK
with more than one browser! Honestly, there was so much stuff needed to tailor for different browsers it was nerve-wracking. (As I
recall, it was a bit of a challenge to generate "vanilla" HTML with Visual InterDev, as it had a bias towards MS stuff.)

I played around with some Perl early last year and just about choked myself. Perl is a nice language, but it has the annoying property
that stdout is still the console (somewhere), rather than the HTTP session. Working with Perl is like learning to work with marionettes
-- string puppets. You're standing above them trying to make these things appear somewhat realistic while your view is perpendicular to
that afforded your audience. Not my idea of fun.

Then I picked up PHP last fall and wondered where it had been "hiding out". Talk about a breath of fresh air!

The only tough part is the somewhat "religious debate" of whether to mix PHP code and HTML tags in the same file or keep them separate.
The best argument I've heard for separating them is to allow for template-based forms management.

Another aspect is whether to have separate scripts for handling GETs and POSTs for the same screen.

They both have valid arguments on both sides, but neither of the arguments are limited by the language the way Perl (and ASP, to a
lesser extent) is.

Regarding books, up until a few months ago, there were only a few, and they aren't very good. A whole new batch started hitting the
shelves lately. One that looks very good is "PHP4 Developers Guide". It's 30% off at Border's this week, but that's off a $59.95 list
price with no CD! (The source code from the book can be obtained online, though.) I've found the book "Core PHP Programming, 2nd Ed"
by Leon Atkinson to be the most useful. (Don't get the 1st Ed!)

I do wish somebody would publish a little 50-page freebie book that contains all the info on installing and setting up PHP so every book
doesn't have to reiterate this info.

-David Schwartz

Kevin Brown wrote:

> OK, I finally took the bit in the mouth and started chewing. I'm doing some php
> for my own learning benefit and because I need to do some stuff in it for work.
>