iain duncan wrote:
> On Tue, 2006-14-11 at 10:17 -0800, Ian Wilson wrote:
> > How do you organize the forms iain ?  I mean I have probably 30+ forms
> > with 10+ controller classes.  You just put all the forms in one file ?
> >  Don't the names clash ?  Or do you have some sort of alternate
> > organization?
>
> I haven't got enough of them to matter yet. =/
>
> Maybe sub classing them would be smart.

Sub-classing is perfectly fine though if you're not really changing
behavior (read overriding methods) but tweaking the template or
parameters (those listed at "params") passing them to the constructor
is usually enough.

> I don't know yet. In the past on
> other platforms I've tried to keep my forms as generic as possible so
> they only need to be passed differences. This kind of thing would be
> interesting to have on a wiki, I imagine there are a lot of good tips
> out there on large web app project management and code organization.

Now, just my 0.2€ of "bike-shedding":

myapp
 |___ package
 |      |_______ controllers.py
 |      |_______ widgets.py
 |      |_______ validators.py
 |      |_______ templates
 |      |_______ static
 |      |_______ model.py (package-specific business objects)
 |___ another_package
 |      |___ ......
 |___ lib (general purpose classes, functions, etc...)
 |___ tempates (site-wide templates)
 |___ model.py (base business objects inherited by packages' models)

General-purpose widgets would go into their own egg (like TinyMCE).

If the app somewhat big or I want to be able to release/upgrade/mantain
those packages independently I would package them as eggs and load
their controllers into the main app's controller via entry-points
(gosh, how I long for 1.1's WSGI-ness! ;) ) BTW, I'm using genshi and
SQLAlchemy here, which I believe make easier this modularization
(specially SA)... I'm not sure how I would accomplish that with SO and
Kid so YMMV...

Hmm, I'm getting kind of an OT feeling now.... :)

Alberto


--~--~---------~--~----~------------~-------~--~----~
 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to