I know some mention has been made of improving reusability in TG 1.1,
but I can't find any specifics.  What's the view going forward?

The big issues I can see right now are:

1. What's the recommendation for structuring model, controllers, and
templates for reusable components?
2. What's the recommendation for dealing with the different supported
ORMs and template engines?

Taking the "registration" component as an example, it requires its own
model classes (which depend on the Identity classes), its own
controller classes, and a number of .kid templates.  It's written as a
quickstart template, which allows it to merge its code with a new
project's, to some extent.  It also contains a separate model for each
of SQLObject and SQLAlchemy support, and decides at project creation
time (via a Cheetah directive) which version to install.

After creation, the new project looks like:

/myproject/myproject/
   controllers.py (as usual; user has to import reg's controller and
add an entry point by hand)
   registration_controllers.py
   model.py (as usual)
   registration_model.py (imports model.py)
/myproject/myproject/templates/
   welcome.kid, master.kid (as usual)
   register_*.kid (where * represents about nine different templates)

In the ideal, post-1.0 world, should this all live in an installed
.egg for that particular component, outside the current project's
directory?

If so, that makes customizing or interactions (like the way
registration depends on Identity) problematic.  I'm also unsure
whether SQLObject will have problems with model objects outside the
current class path (for tg-admin sql create and such).

If not, it seems that the choice is whether to separate things 1) by
component (a la Django) or 2) by component type (the way we do now
with templates, and the way the "big" quickstart template does for
controllers).

Ideas?
-- 
Tim Lesher <[EMAIL PROTECTED]>

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

Reply via email to