[Web-SIG] more comments on Paste Deploy

James Bennett ubernostrum at gmail.com
Wed Mar 7 13:08:13 CET 2007

On 3/7/07, Jim Fulton <jim at zope.com> wrote:
> Aside from the universal configuration file issue, I think this would
> be a terrific thing for us to focus on.  Something I hear a lot is
> how much easier PHP applications are to deploy to hosting providers.
> I would *love* it is Python had a similar story, even if only for
> smaller applications.
> I'd love to get some input who know a lot about what makes deploying
> PHP apps so easy.

I've mostly been lurking because everybody here's quite a bit smarter
than I am on most of the issues discussed, but in a past life I had a
fair amount of experience working with and deploying PHP, so I'll
throw in my $0.02.

PHP is (or was, when I was doing it) "easy to deploy" largely because
of two things:

1. mod_php.
2. Baked-in database libraries.

Everybody already knows that web-server setup is a wart for Python
(and the discussion on that lately has been encouraging), so I won't
dwell on it except to say that I live for the day I'll be able to drop
my Apache -> mod_proxy -> lighttpd -> Unix socket -> FastCGI -> WSGI
-> Django setup (this on a "Python-friendly" shared host, no less) and
have a server configuration that's simpler than the blog app it runs.

The database issue is one that seems to get overlooked a bit, but is
also a killer. PHP gives you SQLite and MySQL support for free, and
Postgres is trivially easy to add if a host is offering Postgres
databases. Meanwhile, most hosts are still with Python 2.3 or 2.4, so
you don't even get SQLite out-of-the-box. The better ones will have
appropriate DB modules installed anyway, but that still seems to be
something of a crap shoot, and somebody who has to build their own
copy of mysqldb to use Python on their hosting account is somebody
who's not going to use Python on their hosting account.

I'm hoping that the ongoing framework hype will help a lot with the
database issue, though; a number of hosting companies right now seem
to be waking up and realizing that there's a lot of money to be made
from framework converts who need solid support for languages that
aren't PHP.

I'd say that if/when these two issues are overcome, or even made
slightly less nasty to deal with, there's not really anything else PHP
can compete on; WSGI and the ever-expanding range of kick-ass web
tools Python offers blow PHP out of the water. To take an easy
example, cruft-free URLs are still anywhere from tedious to nasty under
PHP; you have to fiddle with mod_rewrite, and every PHP project has
its own monolithic URL dispatch system. On the Python side, WSGI and
tools like Paste Deploy make it trivially easy to hang any app anywhere you
want it in your URL scheme.

And setting aside actual technical issues, I also think there's room
to work with documentation; going back to Jim's comment at the PyCon
frameworks panel about documentation that tells stories, it's worth
pointing out that a lot of the "PHP is easier" perception is largely
just that -- a perception -- and that various languages and tools, PHP
included, have compensated for some pretty nasty warts by telling
compelling stories (Rails certainly wouldn't be where it is today if
not for some great storytelling on the part of the people marketing
it). I'm sure we have plenty of good stories we could tell, and I'm
pretty sure we don't have as many warts :)

"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

More information about the Web-SIG mailing list