[aklug] Re: Linux/Drupal/PHP/Latest LJ

From: Arthur Corliss <acorliss@nevaeh-linux.org>
Date: Fri Oct 12 2012 - 10:20:57 AKDT

On Fri, 12 Oct 2012, Josh Rhoades wrote:

> I'll get no points for speaking at all well of the be-lipstick'd pig
> that is PHP, but I feel it's worthwhile to mention the following:
>
> - With nearly all of the shared hosting services that I've used or
> recommended to others, PHP tends to be what is available and best
> supported among their offerings (Ruby, Python, Perl, everything else
> is "tacked on"). When you're looking for cheap and easy, PHP is what's
> there. Maybe this reflects poorly on the hosting services I've used or
> recommended to others, or poorly on my geek cred for not just hosting
> my own services, but at the very least it seems to be web development
> and shared web hosting's lowest common denominator. Not an argument
> for PHP, exactly, but for why things are written in PHP.

"Best supported" is a somewhat ironic statement given PHP's security record,
isn't it? If you outsource IT support you'll find that MS Windows is the
platform most companies best support as well. Not that that provides much
comfort as the viruses & trojans rampage through your network.

For a non-programmer, I agree, PHP is the simplest solution. But that's
still a long stretch from best, safest, robust, scalable, etc. Here's a
great quote from the original creator of PHP, Rasmus Lerdorf:

   I'm not a real programmer. I throw together things until it works then I
   move on. The real programmers will say "Yeah it works but you're leaking
   memory everywhere. Perhaps we should fix that." I'll just restart Apache
   every 10 requests.

That should absolutely frighten you.

> - PHP's "tagging" syntax ("<?php ... ?>"), while older of school, is
> convenient, and mostly unambiguous. It's not well designed, or well
> thought out, or that popular among the MVC/HTML Templating crowd these
> days. But it's a clean separator between plain HTML and HTML generated
> by code I've written. It's tiresome guessing how TemplateToolkit will
> Perl-ify a virtual method call, or how far Razor's parsing engine can
> tell between what it thinks is C# code and an HTML tag. It's nice to
> be able to learn one set of semantics for both backend code and
> frontend code. Given this, I like to think of PHP as an HTML
> templating language that just got out of hand.

Your last sentence here is probably extremely accurate. Way to poke me on
the Template Toolkit, BTW. ;-) I *like* it, and use it to generate my
static site.

<snip>

:-) Always good to see Josh poke his head out of the woodwork. Even if he
makes me cry inside a bit...

         --Arthur Corliss
           Live Free or Die
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Fri Oct 12 10:21:06 2012

This archive was generated by hypermail 2.1.8 : Fri Oct 12 2012 - 10:21:06 AKDT