directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <>
Subject Re: Partition configurations [was Re: [CONF] Apache Directory SandBox: Draft - ... ]
Date Mon, 17 Nov 2008 06:31:13 GMT

On Nov 16, 2008, at 5:14 PM, Emmanuel Lecharny wrote:

> David Jencks wrote:
>> I can't say I regard xbean-spring as an ideal solution, but I don't  
>> really understand why people think its any harder to use than plain  
>> spring.
> Because it is !!! Instead of having a single file where you have all  
> you need to get connected to the source, you have to permanently go  
> back and forth from conf to source, guessing what could be the class  
> associated with a name in the conf file, and what can be the  
> attributes you can configure.

I understand that figuring out what class relates to what element is  
more difficult at the moment with xbean-spring.  IIRC the default is  
to use the java package in the namespace and the class name as the  
element name.  I thought lots of namespaces would be harder to use  
than a single namespace, maybe this was not a good decision.  Quite  
possibly it would be better to have a few packages with the  
configurable objects and namespaces for each.

I'm confused about your claim that it's harder to figure out which  
attributes you can configure with xbean-spring than with plain  
spring.  Without looking at the xsd or the class I don't see you have  
any way of telling in either case.  If you look at the class its  
pretty obvious in either case.  With xbean spring you also get a  
schema that most editors will use to provide context-sensitive  
suggestions about what elements or attributes are allowed: this is not  
possible with plain spring AFAIK.  If you can explain further I'd like  
to understand what the problem is.

>> Unless you are changing the tree structure of the configuration  
>> javabeans you don't even need to change the "annotations" to get  
>> the updated schema, just build....
> We don't change the annotation. Never. However, that does not make  
> things easier.
>> at which point you can use your favorite xsd-aware editor to check  
>> on the validity of your xml configuration before you start up the  
>> server and discover you misspelled an attribute name.  What am I  
>> missing?
> well, I don't have any favorite XSD editor, and I don't have time to  
> absorb the messy XSD syntax. That's one of the reason I find it  
> overkilling.

Xsds are a pretty horrible language, but I admit I don't find them  
that hard to understand.  But with most editors (idea and I'm sure  
eclipse) if you tell the editor about the schema it will provide  
validation as you type and context sensitive hints about what is  
allowed.  I find this a lot easier to use than having to consult the  
class (or the schema) to find out what is allowed.

> May be it's just me, but from discussions I had with other projects  
> as well, XBeans may be a cool techno, but certainly not something  
> which makes developpers life easier. IMHO.

I hope I'm not being too much of a nuisance here.... I don't think  
xbean is the last word in configuration, but I am leaning towards jaxb  
based xml <--> configuration object solutions which have the same  
basic features as xbean spring so I'd really like to understand if  
there are fundamental problems with this kind of approach of having an  
xml domain specific language for component configuration.

david jencks

> Sorry, David, I just dislike xbeans, it makes my life miserable when  
> it comes to manipulate ADS configuration...
> -- 
> --
> cordialement, regards,
> Emmanuel L├ęcharny

View raw message