You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Guillermo Bares <gf...@hotmail.com> on 2005/12/14 16:47:22 UTC

Re: Can Betwixt/Digester directly access public data membersw/ogetters/setters?

I would like to help to code betwixt support.  The approach I mentioned 
seemed to me to a step in that direction.  If you have another approach in 
mind I would be glad to hear it.  Please let me know what you have in mind, 
and I will look into it.
-Guillermo


>From: robert burrell donkin <ro...@blueyonder.co.uk>
>Reply-To: "Jakarta Commons Users List" <co...@jakarta.apache.org>
>To: Jakarta Commons Users List <co...@jakarta.apache.org>
>Subject: Re: Can Betwixt/Digester directly access public data 
>membersw/ogetters/setters?
>Date: Tue, 13 Dec 2005 22:25:01 +0000
>
>On Mon, 2005-12-12 at 20:56 +0000, Guillermo Bares wrote:
> > I am definitely interested in adding support for fields.  If you have 
>ideas
> > of what the best way to go about it would be, I would greatly appreciate 
>it.
> >   T. Dudziak previously Thomas Dudziak that the SetPropertiesRule would 
>be a
> > good place to start.  While going through the source code I noticed that 
>the
> > SetPropertiesRule uses the BeanUtils' populate method to do the update.
> > Would you see the field access using a similar/identical approach?
>
>if you want to give the digester rules a try, then yep.
>
>(let me know if you want help code betwixt support)
>
>- robert
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: commons-user-help@jakarta.apache.org
>

_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: Can Betwixt/Digester directly access public data membersw/ogetters/setters?

Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
On Wed, 2005-12-14 at 15:47 +0000, Guillermo Bares wrote:
> I would like to help to code betwixt support.  The approach I mentioned 
> seemed to me to a step in that direction.  If you have another approach in 
> mind I would be glad to hear it.  Please let me know what you have in mind, 
> and I will look into it.

great :)

first some information...

if you haven't already please take a few minutes to browse the jakarta
(http://jakarta.apache.org/commons/patches.html) and ASF
(http://www.apache.org/dev) websites. i prefer test-driven development
but whether you do or not, it's very important to have unit tests for
all development. 

please use bugzilla (http://issues.apache.org) to submit patches (the
list strips most attachments). of course i'm sure you know that any
contributed code needs to be original work developed by yourself that
you are feel to license to us (sorry about the legalese but that's the
way things seem to be going these days...). patches need to be against
trunk (so you'll need to check out from subversion - see
http://www.apache.org/dev/version-control.html). ATM i use eclipse and i
find subclipse (http://subclipse.tigris.org) works well with the latest
3.2 milestone.



one of the advantages of betwixt is that you can use digester rules.
however, it's not the same as adding proper support for fields into the
core of betwixt.

i think that there are different levels of support so it's possible to
work in stages. 

start by creating a couple of new classes FieldExpression (which will
write out values of fields) and FieldUpdater (which will update POJO's
with values). it's probably best to start by leaving collectives till
later. the other expressions and updaters (especially MethodExpression
and MethodUpdater) can be used as examples. you don't need to wait
before starting this work.

once that's done, the next step would be to add introspection code.
there are two possibility: either generic strategies or dot betwixt
support. it's completely up to you which of these you want to tackle.
ideally support should include both but you probably want to focus on
the one that's going to be most useful for you first. if you let know
which would be most useful, i'll describe how to approach the problem.

- robert


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org