On Oct 13, 2010, at 7:00 PM, Jim Steil wrote: > Hi > > With TG2 it appears easy to have multiple model files allowing you to break > your model into logical modules. With TG1 you had just one model file. I'm > wondering what the pros and cons of each approach are and what people feel is > the 'best' approach. I realize that this will depend on my app, but would be > interested in hearing from others who've made this decision already. >
There is no difference between TG1 and TG2 here. SQLObject and SQLAlchemy both allow for several modules defining the data model. And thus the much more general rule of "how many classes per file" would apply. Yet there is none. It's perfectly fine to have dozens of very simple class/table-definitions in one file. And there are classes that deserve their own file by themselves. It's a matter of taste. I personally tend to write things into one file (thanks a lot I'm not doing Java anymore), and eventually break it into several ones if it becomes to large to easily navigate. Diez -- You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/turbogears?hl=en.

