beehive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rich Feit <richf...@gmail.com>
Subject Re: netui and the xmlbean config file
Date Tue, 30 Aug 2005 17:39:50 GMT
This sounds great to me.  A simple (in the end :) ) solution.
Rich

Eddie O'Neil wrote:

>  I've spent a couple of hours now looking at how to do this -- here's
>a summary of the approach so far:
>
>- create a package "o.a.b.n.u.c.bean" which contains a pile of
>read-only JavaBeans that represent the configuration options available
>for the NetUI runtime.
>    - each bean follows a naming that the class name ends with "Config".  
>    - each bean provides a constructor that takes values for the
>bean's properties.  This keeps the classes really simple and avoids
>having to write subclasses for each type of config file (XMLBean,
>Spring, HiveMind, etc).
>- add a factory "o.a.b.n.u.c.ConfigFactory" which returns a factory
>implementation that can produce a NetUIConfig object
>- provide an implementation of this ConfigFactory called
>XmlBeanConfigFactory which will create the NetUIConfig JavaBeans by
>walking a beehive-netui-config.xml file and mapping the XML values
>onto the JavaBeans in the "o.a.b.n.u.config.bean" package
>
>  Once this is done, all of the clients of the current XMLBeans just
>need to be switched to the new config bean layer.  With that done,
>NetUI will no longer expose XMLBeans in the public API.  :)
>
>  Thoughts?  Suggestions?
>
>Eddie
>
>
>On 8/29/05, Daryl Olander <dolander@gmail.com> wrote:
>  
>
>>+1
>>
>>On 8/29/05, Steven Tocco <stocco@bea.com> wrote:
>>    
>>
>>>+1, seems like the right long term move and the right time to do it
>>>before v1.0 is cut.
>>>
>>>Thanks
>>>Steve
>>>
>>>-----Original Message-----
>>>From: Rich Feit [mailto:richfeit@gmail.com]
>>>Sent: Sunday, August 28, 2005 3:09 PM
>>>To: Beehive Developers
>>>Subject: Re: netui and the xmlbean config file
>>>
>>>+1 -- I agree w/ this (good to avoid going 1.0 with something we know
>>>we'll deprecate), and it doesn't seem too risky (especially if you use a
>>>
>>>tool to create the delegation :) ).
>>>
>>>Rich
>>>
>>>Eddie O'Neil wrote:
>>>
>>>      
>>>
>>>>All--
>>>>
>>>> One other thing I noticed while going through the Javadoc for NetUI
>>>>is that we're exposing the NetUI config file
>>>>(beehive-netui-config.xml) in a public API as an XMLBean.  In this
>>>>case, this seems like a bad practice as it puts the NetuiConfig type
>>>>into the public API.
>>>>
>>>> The problem is that if if someone wanted to configure the runtime
>>>>via Spring / HiveMind / etc, this isn't easy to do since the current
>>>>implementation of configuration is exposed on the
>>>>org.apache.beehive.netui.util.config.ConfigUtil class.
>>>>
>>>> I'm going to take a crack at switching this over to a JavaBean API
>>>>for 1.0 -- since we're going to be stuck with this API for a while, it
>>>>seems like a good thing to enable.  :)
>>>>
>>>> This would basically look like a complex JavaBean that has a similar
>>>>nesting structure to the XML document implemented in abstract base
>>>>classes.  Then, an XMLBean implementation to those classes will
>>>>delegate to the XMLBeans that parse the beehive-netui-config.xml file.
>>>>Clients of ConfigUtil would then jus talk to the JavaBeans direclty.
>>>>
>>>> Other thoughts / comments?  Do others thing that this is 1.0 worthy?
>>>>
>>>>Eddie
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>      
>>>
>
>  
>

Mime
View raw message