Guys
Thanks, I really appreciate the responses. This is just what I was
looking for.
-Jim
On 10/14/2010 3:59 AM, Christoph Zwerschke wrote:
Am 14.10.2010 00:54 schrieb Diez B. Roggisch:
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.
I would make the same suggestion. The model classes usually can be
grouped to logical units which you want to group into files. For
instance, user management already has its own file "auth.py".
Btw, I found that it does not make a big difference when using an IDE
such as Aptana where you can drill down to the level of classes and
their methods inside the package explorer. The extra level provided by
files is only needed if you have a lot of classes, or if your files
grow too big because you're adding many properties and methods.
In fact it's a very powerful feature that you can add methods with
application logic to the model classes, creating what's sometimes
called "business objects". So the model classes can become quite
large, which would be another reason for putting them in separate files.
Btw, it's actually not only application logic, but often also helper
methods for the presentation, which strictly speaking belong to the
"view" in the MVC paradigm. Only if it involves HTML or CSS then I
never put it in the model, but use templates and widgets.
-- Christoph
--
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.