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_yourselfBy 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 --
smime.p7s
Description: S/MIME Cryptographic Signature
