More on web development
bbhaydon at my-deja.com
bbhaydon at my-deja.com
Sun Jan 14 22:31:15 EST 2001
www.modpython.org. The new mod.publisher module behaves similar to Zope
etc..
--
Brett Haydon
In article <0hr16t4gt4vp72b8aqcs0tup6ddcs1urtr at 4ax.com>,
Tim Roberts <timr at probo.com> wrote:
> The recent thread on web development techniques and templating vs
> Python-as-HTML has been very helpful. I wonder if I might explore
another
> aspect of this, which actually relates more to using Python in larger
> applications.
>
> There are a number of ways to architect a Python-based web site with
many
> pages. I have tended to build my site with one script per page, so
that
> the URL simply points to the .py file. I'm now realizing this has a
number
> of disdvantages. For one thing, it can be difficult to share global
state.
> I've tried to put common things, including instances of global data,
into a
> "common.py", but since common.py has to be imported into almost every
file,
> there seem to be multiple instance issues.
>
> I'm wondering now if it would be better to have the whole site
dispatched
> by a single script, using the PATH_INFO part of the URL to identify a
> command to be executed. Does anyone have any feelings about this?
>
> I'm also considering switching my global state from module-based to
class
> instance-based. The biggest advantage to this, it seems to me, is
that I
> no longer need to worry about importing my common.py everywhere. I
can
> pass the global class instance around and call the methods without the
> import, and without worrying about nested import dependencies.
>
> Any advice from the more experienced Python web developers?
> --
> - Tim Roberts, timr at probo.com
> Providenza & Boekelheide, Inc.
>
Sent via Deja.com
http://www.deja.com/
More information about the Python-list
mailing list