directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <minf...@sharp.fm>
Subject Re: Toward 2.0...
Date Wed, 18 Mar 2009 00:50:14 GMT
Emmanuel Lecharny wrote:

>> The name of the principle you are currntly violating by using Spring 
>> is called the "Don't repeat yourself" principle:
>>
>> http://en.wikipedia.org/wiki/Don%27t_repeat_yourself
>>
>> By storing class names in two places (the Java class file, and the 
>> Spring bean definition XML file) you are adding 2500 different 
>> opportunities for the classes and spring configs to go out of sync.
>>
>> And there is nothing in the class to suggest that a spring bean is 
>> somehow relevant, making refactoring impossible, and that kills code.
> 
> => why using Spring  ? :)

Exactly :)

> The only little problem with this approach is that writing a XSD is an 
> order of magnitude more painful than dealing with all the Spring crap.
> 
> => Why using XML when not absolutely necessary ? ;)
> 
> Die, XML, die ! (well, I may die before XML ... :/ )

The trouble with properties is that they are not always that good at 
expressing hierarchies of concepts (something XML does well), and if you 
accidently spell a property wrong, that property silently vanishes, 
leaving the end user staring at the config for hours trying to figure 
out why it isn't working as expected.

A config that is wrong should fail early and fail often (to misuse the 
expression), and the end user should ideally be told exactly what they 
did wrong.

That said, both Fedora and OpenLDAP use the DIT for config, so that may 
be an XML free option :)

Regards,
Graham
--


Mime
View raw message