Using Python for my web site

Luis M. González luismgz at gmail.com
Tue Aug 1 09:38:49 EDT 2006


Cliff Wells wrote:
> On Mon, 2006-07-31 at 22:25 -0700, Luis M. González wrote:
> > I don't have experience with Django or any other python framework, but
> > I have used bare-bones mod_python and it rocks.
> > I wouldn't use PSP though...
> > It is not very polished, and they way it handles the "indentation
> > problem" in python is a little bit confussing.
> >
> > IMHO the best way of using mod_python is with its publisher handler.
> > It let's you code your applications in a MVC (model view controller)
> > style.
>
> While I agree (or at least consider the point moot) that this is
> possibly the best way to use plain mod_python, I'd disagree that it's a
> good way to develop modern web applications in Python.  By the time
> you've decided on every bit of framework to use, and made all the little
> decisions that go into turning a fresh, clean spot on your hard drive
> into an application, what you've done is reinvent TurboGears rather than
> develop your application.  Worse, you've probably reinvented it poorly.
> I've done so many times and am well aware of what a time-waster it is.
>
> You say that you haven't tried Django or any other Python framework.
> Perhaps you should.  You seem to have at least the start of the right
> idea about web application organization, so I think you'd be pleasantly
> surprised with what you'll find already done for you by the major Python
> frameworks and how much time you'll stop wasting on code that isn't part
> of your application.
>
> Regards,
> Cliff

Well... yes, you're right.
I guess that the reason for not having used a framework already is
laziness...
I have experience with Karrigell, which rocks too, but it lacks some
deployment options (no mod_python, no fastcgi, etc).

And as far as I could see in the Django docs, I should learn many new
things to do exactly the same, such as yet another templating language
or how to map urls with regular expressions (I still couldn't wrap my
head around regex... I find them very boring to learn...). But you are
absolutely right. I should definetely try Django sometime.
I guess I'll do it when I have a real need to do some serious web
stuff.

As for TurboGears, I'm not very impressed...
This is a pile of different components picked by someone according to
his liking, very well glued together. Althouh its quality may be good,
why should I stick with a number of components chosen according the
criteria of some other guy?
For example, why kid instead of Cheetah? Why CherryPy?
Really, it isn't that hard to install cheetah and, if you want an
object relational mapper, sqlobject. Once you have them, using raw
mod_python is just a pleasure.
I feel I'm in front of a white clean canvas and I just start coding.
I like the flexibility of being able to choose each part of "my own
framework".
I even created a small script that does the automatic crud stuff for me
(not as polished as Django for sure, but it works like a charm).

Anyway, there's still an issue with using these frameworks:
Availability. It's very hard, if not impossible, to find a decent web
host at an affordable price. Although I guess many of those who use
Django, for example, run their own host.
Being able to use raw mod_python gives you an advantage here. 

Luis




More information about the Python-list mailing list