I think its not a good idea to copy code, to separate common things. The 
behaviour of FieldMolder and FieldHandler are nearly the same. 

As far as I know, the sequence is as follows (please correct me, if not):

MappingLoader reads the mapping file and generate the ClassDescriptors and the 
FieldDescriptors. A part of the FieldDescriptor is the FieldHandler which is 
used to access the set/get/field methods in the data classes.
Now, the ClassMolder and the FieldMolder are used only in the JDO environment. 
OK, but what is changed in the set/get/field accessor? The FieldMolder is 
able to use the FieldHandler to access the methods. Duplicating code is never 
a good idea.

BTW, what's about log4j?

Dirk

Am Dienstag, 18. Juni 2002 22:08 schrieb Keith Visco:
> Dirk Hoffmann wrote:
> > Hi,
> >
> > I take a look at the Castor implementation. Actually I see many problems
> > arising.
> >
> > 1. Some classes seems to be "copy and paste". For example, the
> > FieldMolder get... and setValue method (and some others) are nearly the
> > same as in the FieldHandler. Why is FieldMolder not using the Methods
> > from FieldHandler.
>
> Thomas decided to separate Castor JDO from Castor XML as much as
> possible. In doing so he copied the FieldHandler to FieldMolder and made
> some JDO specific modifications.
>
> > 2. I believe that adding more features into castor will blow up the code.
> > Some parts of the code realy needs to be refactored.
>
> Which parts need to be refactored? Can you elaborate on your goals a
> bit? If it's JDO specific issues please get in touch with Bruce Snyder
> and Ned Wolpert. If it's XML, then let myself and Arnaud know! We can
> use the list to discuss the issues so that any interested parties can
> follow the discussion.
>
> --Keith
>
> > 3. To stop the questions about logging; why don't use log4j ;-)
> >
> > If there is some interrest, I will refactor some parts of the castor
> > implementation.
> >
> > Dirk
> >
> > -----------------------------------------------------------
> > If you wish to unsubscribe from this mailing, send mail to
> > [EMAIL PROTECTED] with a subject of:
> >         unsubscribe castor-dev
>
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>       unsubscribe castor-dev

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to