Hi Andrew, thanks for the quick and informative reply!

> > Basically I sold the idea of xdoclet to management.  I still need to get
> > buy-in from Java programmers though.
> 
> Interesting, normally I'd think it would be the other way round.
> 
Yeah, it is a rather unusual situation.  In my case management is actually
rather easy: they understand copy-and-paste code are high maintenance ( ==
cost more ), so that was easy.  

The programming team, OTOH, has people who are less ready to change their ways
though, and it is for those people that I am trying to design around.  Also we
are not really doing EJB, just a lot of repetitive project-level copying, so
their current pain is not as evident as J2EE programmers.

> 
> Do like the EJB modules do, namely
> 
> (1) programmer writes foo.java containing the tags and the
> implementation of bar().
> (2) programmer writes foo.xdt to generate fooFinal.java which extends
> foo.java; the generated code includes a bar() method which calls
> super.bar(), so your implementation code gets run.
> 

Thanks for the advice!  That's also the approach suggested to me in the
"Xdoclet in Action" forum thread.  Coming from both a project member and a
book author it's surely THE WAY!  :)  I'll probably end up doing that.

However, philosophically speaking from an xdoclet newbie's perspective, I just
thought that extending every class that has special functions (which, when you
are not doing EJB, is pretty much every class) is not as simple/clean as can
be.  From my "plain old java/servlet" perspective, I just need to generate one
class per foo.java file.  So extending everyone of them seems wasteful/heavy.
 But then again I am kind of deviating from xdoclet's original J2EE roots, so
I guess it's to be expected.

I still think my:

> >   <XDtMethod:forAllMethods>
> >     <XDtMethod:currentMethodContent />
> >   </XDtMethod:forAllMethods>

idea has merits in cases for POJO/servlet projects, which is probably more
prevalent than J2EE/EJB.  I would think that since all the packages, classes,
methods and even fields are exposed to xdoclet, it would be easy to also
expose the "meat" of the methods just for copying/merging.  Is that really
that big of a performance hit?  Is it even worth trying (say, by some
head-strong guys like myself) to contribute such a tag?  Do you see any value
in that?

I got tired of typing myself.  I'll now leave you alone :)

Paul




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
xdoclet-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to