commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leon Rosenberg <>
Subject Re: New Tag - Looking for Comments (Maintain user code during regeneration of files)
Date Mon, 20 Jul 2009 21:42:27 GMT
I must second Ted on this.
Talking about WSDL - consider IDL compilers, they usually generate an
Interface (operations) and a basic BOA (later POA, which stands for
basic/portable object adapter). You have the choice between extending
the BOA or implementing the operations interface and "tie" your impl
to a standart BOA implementation. In both case you never touch
generated code, which gives you an additional advantage of using same
code with different orbs, even the underlying generated code differs
from orb to orb and from version to version.

Of course, if you are working with generators and edit generated code
for years, and never had any troubles, this may be a good solution for
you, but generally speaking ... there is some room for improvement...

Btw, I'm also writing code generators for many different purposes for
years, starting with generating a corba or rmi based code distribution
from a java interface, and up to generating a complete struts
application out of two xml files, so I'm absolutely PRO code
generation, as long as it never touched by the developer :-)

best regards

On Mon, Jul 20, 2009 at 11:25 PM, Ted Dunning<> wrote:
> What you describe is exceedingly bad practice.
> Much better to take the approach that thrift does where the generated code
> is never touched by the developer.  The thrift code generator generates
> portable marshaling code and an interface.  The programmer implements the
> interface and injects their implementation and a transport into a server at
> server construction time.  Clients inject a transport into a client
> interface.
> This separates generated code from hand-written code and is a very effective
> approach.  Changes to the thrift IDL are easily propagated into Java (or any
> other supported language).  Changes to the implementation are preserved with
> no fancy footwork required.
> With the approach you describe it is exceedingly difficult to guarantee that
> the developer's code is preserved.
> On Mon, Jul 20, 2009 at 12:09 PM, Jason Weinstein <
>> wrote:
>> On the server side you generate a set of boilerplate implementation classes
>> which include a set of stubs for the web service interfaces. The developer
>> then codes in the implementation for each method. Quite often changes are
>> made to the wsdl and the files need to be regenerated. In this case it would
>> be nice to maintain the existing developers code.
> --
> Ted Dunning, CTO
> DeepDyve

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message