--- Darren Hartford <[EMAIL PROTECTED]> wrote:
> Hey all,
> Before I start doing some late nights on this, would
> like some feedback if this 
> 1. makes sense
> 2. is too complex/non-standard
> 3. or if it is just plain nuts
> 
> You have data going into Struts forms, and you also
> have data going into Entity Beans/JDO/OR mapper. 
> Usually, these are the same fields and information. 
> Does it make sense to add Validator tags as you are
> defining Accessors within your Entity Beans/JDO/OR
> Mappers/DTOs/etc?
> 
> Entity Bean Example (MyExampleBean):
> 
> /**ClassLevel**/
> /* Get a resource from within the JAR(aka
> getResourceAsStream).
>  * @validator
>  *    jarresource="validate.xml"
>  *
> */
> 
> /**Method level:**/
> /**
> * Sets email
> *
> * @param java.lang.String the new email value
> * @ejb:interface-method view-type="local"
> * HERE IS THE NEW TAG - rule is applied from
> class-defined resources 
> * @validator
> *     rule="email"
> */
> public abstract void setEmail(java.lang.String
> email);
> 
> 
> This would create a new MyExampleValidator class
> (along the same premise as MyExampleUtil and
> MyExampleCMP). Pass the bean.field for validation
> and/or bean.value-object.  Obviously, this can
> easily be applied to Business Objects, DTO's, and of
> course JDO implementations.
> 
> 
> From 10,000 foot level, this looks like a good idea
> to me.  Input? Comments? Yay/Nay/When can I help
> out?
>

It definitely makes sense. XDoclet is all about saving
you from doing things twice ( trice ;) ) 

But sometimes it's not easy to decide how to do it
better.

Struts forms were generated from abstract ejb classes
( mostly
because sruts insist[ed] on ihneriting action form.

It's not overly complex, but writing .xdt templates is
a bitch....

You may look at new very al�ha xdoclet 2 - it' easier
there, ant it's already usable but plugin set is very
limited...

regards, 

=====
----[ Konstantin Pribluda ( ko5tik ) ]----------------
Zu Verst�rkung meines Teams suche ich ab Sofort einen
Softwareentwickler[In] f�r die Festanstellung. 
Arbeitsort: Mainz 
Skills:  Programieren, Kentnisse in OpenSource-Bereich
----[ http://www.pribluda.de ]------------------------

__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to