Python as replacement for PHP?
dave at pythonapocrypha.com
Sat Feb 28 01:03:28 CET 2004
> Dave Brueck wrote:
> > Bart wrote:
> >> Erik Johnson wrote:
> >> When it comes to dynamic, DB driven sites, PHP is the only way to go.
> >> Python is not even close to being suited for this task. PHP claims to be
> >> a general-purpose language, but I do not know anyone who uses it for
> >> anything other than dynamic Web programming.
> >> A serious business decision? PHP would be the only winner here. You
> >> should not even be considering another language for this, it borders on
> >> stupidity.
> > What on earth?! Each is entitled to his or her own opinion, but this is a
> > bit over the top. The OP would do well to search the Google archives as
> > this topic has come up many times, and there are many who disagree with
> > the above opinion. Even if in the end the OP decided to stick with PHP
> > (personally I wouldn't), considering Python definitely does _not_ border
> > on stupidity.
> > -Dave
> Sorry, I disagree. As a business decision, it does border on stupidity. Why
> contemplate doing something with Python that would be tedious and difficult
> at best when PHP can do this task easily and quickly???
Specifically which Python templating language(s) have you tried and found to be
"tedious and difficult" to use? Why is it that some people, knowing both PHP
and Python, opt for Python? It's gotta be something more than their own
ISTM you're way overstating the gap, if there is one in the general sense. It's
trivial to think of cases where PHP would be the "right" choice and others
where Python would be the "right" choice, so it's hard to put much stock in any
claim that it's so black-and-white, especially when you know so little of the
OP's requirements. Is it one of those "nobody ever got fired for buying IBM"
things? :) I can believe that for some DB driven dynamic web sites PHP would be
better suited, but *always*? No way.
> The OP spoke of a DB driven dynamic Web site. One cannot think of such a
> thing without naturally thinking of PHP... python should not even come to
> mind for this task.
> Backend/server-side processing, sure, but not on the
> frontend. Use the RIGHT tool for the job. Python isn't the right tool here.
But why? What specifically is it about Python that makes one "stupid" for
considering it? (and does that mean that the many people who *do* use it - and
do so quite successfully - for such tasks are stupid?). Maybe I haven't seen
the light yet, but it's worked pretty well for me.
PHP has some good features, but it's certainly not perfect. Maybe it'd be okay
if it's were your first programming language, for example, but if you are an
experienced developer in other languages then PHP has its own bag of ...er...
surprises (did PHP5 finally fix the horrible copy-on-assignment "feature"?).
I have a friend who made a living for awhile as a "fireman" for PHP
projects-turned-disasters. In assessing the root causes of the disasters, much
of it was attributed to developer sloppiness or lack of experience, but a lot
of it went to language oddities such as weak OO facilities or the
over-encouragement of global variables. Overall the impression was that as PHP
projects grow in size, they tend to get unmanageable at a rate faster than
"normal" (compared to other languages). Anyway, I cite it only because it's a
web developer who has more experience than I do with PHP, but who avoids it in
his own projects due to specific experience with its problems.
There's just no validity to making the claim that the choice is so clear-cut.
Right tool for the job indeed!
More information about the Python-list