Using Python for my web site

Cliff Wells cliff at develix.com
Tue Aug 1 14:16:45 EDT 2006


On Tue, 2006-08-01 at 06:38 -0700, Luis M. González wrote:

> Well... yes, you're right.
> I guess that the reason for not having used a framework already is
> laziness...

Trust me, I'm quite familiar with the laziness problem =)

> 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.

Agreed.  But on the other hand, it isn't always about having "the best"
of each (why didn't they use Twisted rather than CherryPy would be *my*
question), but rather having a complete development stack that's
pre-integrated and is *good enough*.  And mind you, the integration work
is quite substantial.  Also, TurboGears has definitely proven the "a
rising tide lifts all boats" maxim, TurboGears has marketing and
community and all the projects that comprise TurboGears have benefited
from it.

Ultimately a framework is about helping you get *your* job done.  If
your job is assembling frameworks or evaluating which ORM is best, then
that's no help ;-)  But I suspect those people are in the minority and
most people just want to get their sites done without trying to figure
out which is "best" and then trying to figure out how to integrate that
with other components.

Also, TurboGears supports template plugins (I wrote one to support
Nevow's Stan, and there is a Cheetah plugin as well), and work is being
done to support alternate ORMs (SQLAlchemy is working now, although not
all the TG addons support it yet).  The goal is to at least offer people
the opportunity to replace certain components in the framework if they
object to some part of TG.  That's not the *ultimate* goal, but Kevin is
a pragmatic guy and recognizes that component bias can hurt TurboGears'
adoption and so is trying to address that in some fashion.

> 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).

Sure, and if you are doing it as a hobby, or to learn or to perhaps take
over the world with a new ORM, then that's great.  But if someone is
paying you by the hour to develop a website for them and you are writing
an ORM when there's already half dozen out there, then someone probably
isn't getting their money's worth.  This is the problem frameworks were
meant to address: putting your focus back on your web application rather
than all the details that go into it.  Do you lose some flexibility?
You bet.  Not a lot, but a noticeable amount.  Of course the flip side
is that you can turn out a pretty sophisticated web app *by yourself* in
a few days.

I saw DHH of Ruby on Rails fame at FOSCON last year and he really
impressed me with is no-nonsense philosophy about web frameworks.  His
approach is the antithesis of Zope, Joomla, et al. Django and TurboGears
are no-nonsense in the same vein: they aren't about providing every
feature under the sun or blazing performance or ultimate
configurability.  They are about eliminating the time-consuming details
that you face every time you start a project.

> 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.

Not true.  As I posted elsewhere there are many hosts who will run
frameworks (I suspect the pressure of Ruby on Rails really pushed open
the door).  Here's a short list from the TurboGears site:
http://www.turbogears.org/preview/docs/deployment/hosting.html

And from the Django site:
http://code.djangoproject.com/wiki/DjangoFriendlyWebHosts

WebFaction (formerly python-hosting) even has a control panel that will
install the framework of your choice with a mouse-click.



Regards,
Cliff

-- 




More information about the Python-list mailing list