Often, when pointing out the problem with Python web programming, people
have been responding that if we just had something as good as Ruby on
Rails we'd be okay. I've tried to respond to that both indirectly and
directly, but I think I need to be more direct, and I've also been changing
my mind on the topic over time.
My standard response has been that people have been creating and
recreating Rails-like systems in Python for some time -- like for
years and years. It hasn't fixed anything yet. But they weren't as
good as Rails people say... well, maybe not, but if it was such a
great idea then three years ago when people were trying this, don't
you think we would have gotten there by now? Rails is not old, it
doesn't have a huge code investment, and it doesn't have any novel
ideas. I'm not trying to talk it down, that's just the reality of
what Rails is -- it's not Seaside or Wee (and if it was it wouldn't
be so popular anyway).
So, I was reading Dave Hansson's response to Why Web Programming
Matters Most, and I came upon this comment that got me thinking:
How can you write ten paragraphs about how Python has no universal
web framework and not even mention Zope? I haven't been embedded
at all within the Python community, but to me this seems like one
of its greatest achievements.
At PyCon I talked with a number of Zope people. And it's
funny... Python programmers really don't like Zope. Python
programmers that have been employed by Zope Corp and contributed to
its design don't even like Zope that much. Jim Fulton (Zope's
architect, and now Zope 3's architect) was quite aware of this, and
I'm sure a bit disappointed. But I don't really mean to talk Zope
down -- rather Zope is an important lesson and example. Because
despite all this, Zope is quite popular. People do lots of cool
things with it. Having worked with Zope 2 a fair amount in the last
year and a half, I still don't like it, and I'm quite sure that won't
change -- but clearly that's not true for everyone.
Zope is also unique among web frameworks, and maybe even among Python
projects, in that it's something where people choose Zope first,
then Python comes along. With most other projects a developer chooses
Python then finds a project in Python. As a result, Zope users are
selected not for an aspect of the implementation -- Python -- but
because they are specifically attracted to Zope and all its metaphors
and design decisions.
This is what Ruby on Rails has. People are selecting Rails, and it
just happens to be written in Ruby. This seems weird, because it's a
developer framework and intimately tied to the language, but it's
clearly what's happening. So as a result, the Rails community isn't
going to fork as developers get frustrated with the specific
metaphors it chooses. They are choosing the framework, not
the implementation. In contrast Python web programmers have been choosing
implementations, then seeing if they can accept the framework (and
forking when they can't).
And actually there are several competing web frameworks in the Ruby world.
Rails didn't first take over the Ruby world, then expand to the wider
world -- instead it immediately went to the wider world, and has been
consolidating the Ruby world more as an afterthought.
This is why Rails-for-Python won't work, or at least what people have
been focusing on with Rails isn't correct. It's not about the
implementation or the quality of the framework, it's about the pattern
of adoption. It's about putting the framework up front, and the
implementation in the back -- even if this wasn't the Rails developers
intentions (though maybe they are clever and this was their
intention).
So, what do we need to do? Well... maybe we should stop trying to
convince each other, and start looking more to the wider world. We
don't need to compete with the exact niche that Rails speaks to --
though honestly it has a lot of overlap with the niche I'm interested
in -- but instead we need to create something for the wider world.
On a positive note: Python has incredible infrastructure and a lot of
good code (not just good design patterns) to offer the world. I'm really
excited about FormEncode, and I think it will soon become the form
processing library for Python. I'm excited about generic
functions, and think they could radically change the way we plug
together models and views. I'm totally unexcited by things like
py2app, py2exe, and Eggs, which is to say I'm really excited that
someone else did all the annoying deployment work that I don't want to
do ;) I'm really pleased that SQLObject seems to be taking on a life
of its own, with both word-of-mouth evangelism and peer support. And
that's just a little of what's going on... Yarn, Schevo,
LivePage... there's a ton of good stuff, stuff that isn't just cool
from a Python perspective, but can serve to actually pull people into
Python regardless of the language. A language is only as good as the things
people create using it... given that standard I don't feel any need to
apologize for Python or come up with any excuses. But maybe we should
start selling it to the rest of the world a little harder.