There is nothing wrong with directly implementing the FieldHandler
interface, however I think the best approach is to extend either
GeneralizedFieldHandler or AbstractFieldHandler...

Extending GeneralizedFieldHandler will allow you to write re-usable
FieldHandlers, otherwise your FieldHandler will most likely be for a
specific field within a specific Class.

Extending AbstractFieldHandler will allow you access to the
XMLFieldDescriptor which has certain information about the field which
may be utilized by your FieldHandler.

(Note: GeneralizedFieldHandler extends AbstractFieldHandler)

If you want to implement FieldHandler directly, then create a base
FieldHandler class that all your FieldHandlers can extend. That way if
the FieldHandler interface changes in the future you can minimize the
changes needed when upgrading to a newer version of Castor.

--Keith

-------- Original Message --------
 Subject: [castor-dev] Correct Implementation of a Field Handler
    Date: Thu, 20 Feb 2003 15:56:50 -0500
    From: "Rodriguez, Christine" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
      To: [EMAIL PROTECTED]

I have been creating field handlers by implementing the FieldHandler
interface. Is this correct?

But I have seen FieldHandlers created by extending
GeneralizedFieldHandler. Is there a correct use of either of the two for
different scenarios?

I appreciate some help.

Thanks,

Christine

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

Reply via email to