[Twisted-Python] How to organize a web application?

I am looking for advice on how to organize a web application. I've never written a web application before, and would appreciate any insight into best practices and overall structure.
I have html pages, html templates, an underlying database, and (hopefully) an understanding of twisted and nevow. What is the best way to glue all of this together?
For example, what is the best way to associate derived rend.Page classes with html templates? I'll have all these different data and render functions that could potentially be used by many different templates. Do I create one monster rend.Page derived class responsible for servicing all the possible display an render functions? That seems wrong. What's the alternative?
What is the best way to manage links? The html page template will link to each other, mostly at the discretion of the html designers (admittedly me at first). Should I utilize the underlying file system to define the link structure as I might do for static html site? If yes, should I use static.File and create a special resource type for the html template and then return rend.Page derived classes? Or should I do something else all together?
What is the best way to manage state (non database)? Cookies or mugged URLS mapped to closures seems like it would work well. Perhaps someone has some experience doing this?
I took a look at the Quotient source, and did not see any html templates at all, so I assume all the html generation is occurring dynamically via Stan or some other method. Likewise for nevow Calendar example which has a single html template and links to dynamically generated pages (I'll probably need to do that too).
Thought and comments?
Thanks, Alex

On Wed, 2004-05-26 at 14:28, Alexander May wrote:
I am looking for advice on how to organize a web application. I've never written a web application before, and would appreciate any insight into best practices and overall structure.
This discussion would be better suited towards either the twisted-web@twistedmatrix.com or divmod-dev@divmod.org mailing list.
participants (2)
-
Alexander May
-
Glyph Lefkowitz