> Is the Velocity engine in WOLips accessible, possibly via Ant?
>
> Here's what I'm trying to do: I am working on a Java Client project
> where the client-side classes have several methods that are exactly
> the same as the server-side version (Validation, Defaults, etc) and
> I don't want to maintain them in two places, and using a common
> subclass for both is not viable because I have to have the client-
> side and server-side classes need to extend different superclasses.
>
> So that leaves me with either duplicating code (and bugs) and
> dealing with keeping them in sync, or figuring out a way to have the
> methods automatically synced. This is where velocity comes in.
>
> I'd like to flag each "common" method as needing to be copied to the
> client-side class and then have a Velocity template that would read
> them out of the server-side and copy them into the client-side
> _Entity class. I would want to execute this step following any
> EOGeneration of my client-side .eotemplate files.
>
> Again, the end goal is to maintain "common" methods in one location
> and have them automatically propagated as part of a build.
It's not accessible from ant, you'd have to wrap it in an ant task or
something if you want to do that.
However, you can have multiple .eogen files for a single model -- you
could maybe create a server.eogen and a client.eogen that use
different templates to do what it is you're trying to do (which I'm
not sure I exactly follow). Are these common things you're copying
generated, or are you writing common methods that they share? Do
server and client share a single _Parent? Can you set this up with
inheritance hierarchy like the current eogen files do, just
introducing a third inheritance level with your own custom templates?
ms
This archive was generated by hypermail 2.0.0 : Fri Feb 08 2008 - 11:44:34 EST