commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ola Berg" <>
Subject Re: [BeanUtils] Javabean diff?
Date Fri, 31 Jan 2003 08:54:03 GMT
I have previously developed a bean differ and started with a Class differ (that from two class
definitions of the same class, or in fact two totally different classes, can express the differences),
and started with a bean patcher (given a bean instance + a diff = reconstruct the bean that
aws diffed against).

The BeanDiffer creates a number of increments or a row of set commands: (set bean property
'name' to 'Ola'), the need for a separate patcher was not, until the demand from the project
came to be able to compare beans of different classes, which created the need for the Class
differ plus a separate patcher object that mainly acts like a factory, and understands a command
in the command row that says (use bean class "").

The requirement for different classes was later withdrawn, so the class differ and the patcher
was never completed. 

The go at trying to diff beans made from different version of the same class (using two class
loaders) was done for my own amusement only, thinking that it could be useful for dynamic
version checking, but I got lost in the class loading magic. However, using clazz, I think
that it could be done, but I have a hard time really seeing the use case for it.

I can 1) browse my source archive at home, and 2) check with my partner at the time if it
is OK to donate the BeanDiffer.


*********** REPLY SEPARATOR  ***********

On 2003-01-30 at 17:02 Craig R. McClanahan wrote:

> On Thu, 30 Jan 2003, Laird J. Nelson wrote:
> > Date: Thu, 30 Jan 2003 19:23:04 -0500
> > From: Laird J. Nelson <>
> > Reply-To: Jakarta Commons Developers List
> <>,
> >
> > To:
> > Subject: [BeanUtils] Javabean diff?
> >
> > Hi; I had written to the -user list about this subject a couple of days
> ago,
> > and Henri Yandell expressed some interest, so I'll carry the nascent
> thread
> > over here.
> >
> > I have a weird requirement at my real job related to Java bean graphs. 
> For
> > reasons that owe much more to bad web services design than anything
> else, I
> > find I need to take two Java bean graphs--one which started out as a
> clone
> > of the other--and extract in some fashion only those paths that reflect
> how
> > the second graph differs from the first.  Think of the diff program
> applied
> > to Java beans: the output, or a derivative of that output, would
> describe
> > only what modifications would need to be made to the first graph to
> make it
> > become the second graph.
> >
> > I figured that this would make an interesting add-on to BeanUtils. 
> There
> > also seem to be some JXPath-ish bits in here.  Is there interest in the
> > BeanUtils/commons community for such a facility?
> >
> I'd be interested in exploring such an idea in beanutils -- not that have
> a direct need, but it is intriguing.  Of course, we'd want to make sure
> that we support DynaBean:DynaBean comparisons as well, and maybe even
> JavaBean:DynaBean comparisons that have the same sets of properties.
> > Cheers,
> > Laird
> Craig
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message