After writing several appengine applications for python, I found myself torn between two approaches to organizing my source tree: wide or deep.
For concreteness, consider the internal application for a small consulting store to manage business operations such as contact management, project tracking and reporting, and employee management. The application can use key objects, such as: company, users, contacts, customers, projects, schedules, etc. Without going into details, one can imagine that these models are cross-cutting functions of the website. This probably means that there is some connection.
In this example, it is preferable to organize in a deep manner, for example:
models/ people.py accounting.py projects.py foo.py controllers/ reporting.py employeeops.py accounting.py crm.py views/ ...
or broadly, for example, through an โapplicationโ:
people/ models/ views/ controllers/ contact-mgmt/ models/ views/ controllers/ time-tracking/ models/ views/ controllers/ project-reporting/ models/ views/ controllers/
I know that the whole construction involves compromises, so when you answer, you can specify your preferences and some arguments (for example, assumptions, modulating problems, scope of limitations, scalability problems, considerations for maintaining the code, the influence of the structure of the development team, etc.).
python google-app-engine directory-structure
Andrew B.
source share