Mark Ramm wrote:

> This is fine when you want super simple things.  But take a
> look at django contrib for a whole list of things that would be
> absolutely impossible if "apps" couldn't change the model.  (A
> simple example, a comments app, which allows you to add comments
> to various content.)

I actually agree with both of you here. Components must be able to
add tables / model objects to your database. That being said, I
don't think that the only way to do this is to hardcode those model
definitions into the components themselves, for several reasons:

1. Its difficult to figure out what the component is creating
    without either digging through the source or the documentation.
    This creates a disconnect between how you interact with your
    model typically, by simply looking at or editing your model
    source.

2. Its difficult to change the data definition or plug in existing
    model objects that provide the needed behavior without doing
    weird things in some configuration file or monkey patching.

I'm tempted to suggest code generation as a solution for this, but I
think that also provides issues when you want to upgrade a component
for example.

Perhaps there could be a balance here, where if you just want the
default behavior of the component, and don't care about making
any tweaks to its behavior, you don't have to have much of the
component's code injected into your project, but once you start to
override things, you can have the code for that particular aspect of
the component copied into your project tree, where you can override
the behavior directly?

--
Jonathan LaCour
http://cleverdevil.org

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" 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-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to