On Jul 16, 2007, at 1:22 AM, Mikaël Cluseau wrote:
> Hi Andrus, and thanks for your answer.
>
> Le samedi 14 juillet 2007 à 22:13 +0300, Andrus Adamchik a écrit :
>> To work around a bad decision made a long time ago to use Cayenne
>> runtime objects (DataDomain, DataNode) as CayenneModeler model beans,
>> modeler often uses inner subclasses to suppress various runtime
>> behavior aspects.
>
> This design decision is something I liked, and is one of the reasons
> that made me choose Cayenne: it allows for coded-style project
> transformation, which is very interesting when it come to batch
> processing. I'm using it to convert client's conventions to an
> coherent
> objet model, instead of mapping tables one by one using the modeler
> (you
> guessed it, I'm not a GUI person ;-)).
Ah, glad somebody finds it useful :-)
> I think that the only problem with the current design is that it is
> reversed: you extends run-time objects to modeler objets (ie
> Configuration vs ProjectConfiguration). I *feel* it would be much
> better
> to use a descriptive model suitable for the modeler and *then* to
> extend
> the run-time model to it, using a kind of "meta-model" interface:
>
> // Loads the (meta-)model
> Configuration config = new Configuration("cayenne.xml");
> // Build a run-time model
> RuntimeConfiguration rtc = config.instanciate();
> // Get back the (meta-)model
> assert config == rtc.getMetaModel();
>
> I'm very tight on my deadlines theses days but I would be happy to
> help
> you get rid of this "pain" (you seem to call it this way ;-)) in a
> month
> or two.
Great! Let's discuss it once you have spare cycles.
Andrus
This archive was generated by hypermail 2.0.0 : Mon Jul 16 2007 - 02:44:40 EDT