[Twisted-Python] Organizing a Woven app

Patrick K. O'Brien pobrien at orbtech.com
Tue Jun 10 13:02:35 EDT 2003

I'm starting a fairly large Woven application and I'm wondering if
anyone else has a directory structure and module organization approach
that works well with Woven.

As an experiment, we created a small application with the following
approach.  We created directories named model, page, and template.
Each directory holds a file that corresponds to the url in the
interface.  For example, lets say we display a list of customers at

Our page directory would have a customer.py file containing a Page
subclass pointing to a "customer.html" template located in our
template directory.  Data for the page comes from the customer.py file
in our model directory.  This worked, but just doesn't seem ideal.

I'm just not sure that this approach is going to scale well, or if the
way we're dividing up modules and directories is the best approach to
take for a large Woven application.  I think we might be splitting
things up too much.  I noticed that the twisted.issues project takes a
different approach, storing all models in models.py, all pages in
pages.py, and all views/widgets in widgets.py.

Rather than find out later we took a bad approach, I'd love to hear
from anyone who is farther along than we are.  It's hard enough to
figure out Woven, so I'd rather not complicate things with a poor file
arrangement.  All tips and suggestions would be greatly appreciated.

Patrick K. O'Brien
Orbtech      http://www.orbtech.com/web/pobrien
"Your source for Python programming expertise."

More information about the Twisted-Python mailing list