Python web development, really

Paul Boddie paul at boddie.net
Wed Jan 22 08:22:45 EST 2003


Afanasiy <abelikov72 at hotmail.com> wrote in message news:<45qp2v0488fss981maanr3f2nr6a9as48m at 4ax.com>...
> 

[Per-directory content inclusion]

> Not from what I have seen. I even imagine implicit vs. explicit would
> cause many Python programmers to love writing cascading header/footer
> includes and custom error handling on every new page, even if via paste.

You're really milking this "implicit vs. explicit" thing, but
actually, even those frameworks which do this using mix-ins and
methods, for example, are avoiding copy/paste by encouraging such
approaches. Personally, I can see why you might want to do this stuff
"declaratively" - ie. putting it in an easy-to-understand
configuration file - and I do wonder whether Apache might still
support it, even if mod_python might not.

[Frameworks supporting "global application scoped variables"]

> I don't think they do, and you sound unsure.

Well, consider Webware. Since the application server is just a Python
program with a bunch of threads, you can easily imagine ways that
shared application state can be defined. Unfortunately, I can't easily
find any hints about that on the Webware Wiki, but since Webware is
meant to be Pythonic, any Pythonic approach, whether it be the
inclusion of a module to hold your "globals" or something else, is
likely to be a reasonable solution.

If you want a full persistence mechanism, then all you need to do is
to consult the WebProgramming section of the PythonInfo Wiki and check
out which frameworks offer persistence.

> Which platform do you recommend I test for all of these requirements?
> Many tested so far fail relatively easily. I am looking for concrete
> suggestions from people experienced in this sort of web development.

Perhaps the WebProgramming section needs a bit of restructuring if it
isn't that helpful. However, I'd suggest...

  * Zope for a highly specified and flexible framework... that you've
    already stated that you don't like. That's fine, though, because
    I'd certainly be a bit nervous about deploying applications with
    Zope without having a more complete understanding of all the
    issues involved.

  * Webware and Twisted for Pythonic frameworks which might leave you
    with some additional higher-level framework effort. In other
    words, the framework just stops at some point and then you have
    to make some choices.

  * SkunkWeb, Albatross and Quixote for Pythonic frameworks which
    seem "battle-tested" but which offer integration with various
    technological principles that you might not agree with (Quixote,
    for example, promoting its own presentation strategy, for
    example).

  * Spyce and CherryPy for PHP-like frameworks.

I'm not saying that I've developed for all of these; indeed, I've only
ever really used Zope and Webware from the above. However, I've
investigated them and made notes based on my own experiences with Web
development. If you want a simple, single line "executive-level
recommendation", I'd suggest looking closely at CherryPy, particularly
since it seems to be actively developed and may be compatible with
what you have come to expect.

Paul




More information about the Python-list mailing list