commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Sanders <sand...@apache.org>
Subject Re: [digester] i'd like to contribute - here's my new feature idea
Date Thu, 12 Dec 2002 19:05:03 GMT
On Thu, Dec 12, 2002 at 11:15:02AM -0600, Sean Schofield wrote:
> Greetings,
>

Welcome Sean.
 
> I have been using the great software developed by the jakarta team for some time now.
 I have found it very useful and I would like to contribute something.  I'd like to start
with the commons digester and I have a specific idea.  Let me know if people would like to
see this implemented.  I think sending an email to this list is the right way to get started
but I appologize in advance if its not.
> 
> Here is a generic example of the problem I was trying to solve with digester and an explanation
of how the current code did not completely meet my needs (although I just got started with
digester so I may have overlooked something).  The example is building a GUI client for a
program where the components used to build the client are dynamically configured through an
XML file.  For simplicity I will not address the possibility of components containing other
components.  Here is the xml:
> 
> <client>
>     <component classname="ComponentA"/>
>     <component classname="ComponentB">
>     	<property name="SomeProperty" value="some value"/>
>     </component>
> </client>
> 
> Now I'd like the digester to create a Client object when it encounters the <client>
tag.  OK so far, I'll just use the standard ObjectCreateRule.  The problem then becomes that
I know I will be encountering the "client/component" pattern but I don't know what types of
objects they are until runtime.  I'd like to be able to specify the classname somehow instead
of hardcoding it in the rule setup (or dynamically creating the rule).  Also, each component
may have zero or more properties to set but I don't know the name of the properties in advance.
>

Have you tried using the ObjectCreateRule by passing it the attribute of the classname to
construct, or creating an object factory and using the FactoryCreateRule?  I think those may
help you out there.
 
> I have a specific solution in mind if the team is interested in hearing it (actually
a few possible solutions).  If its determined that we don't want to do it there will be no
hard feelings.  I definitely want to contribute something and all of the mailling lists just
say go ahead and jump in.  If this is a "no go" then I'd be happy to help in another capacity.
> 
> TIA for your feedback on this and keep up the good work!
>

I am definetly interested in hearing your idea, but could you first check out the two approaches
mentioned above and see if you can add anything there.  Maybe in some other area as well?

-- 
Scott Sanders - sanders@apache.org

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message