Since it is an interface adding getUserDirectives2 will break my application. That's the downside with interfaces, if you add stuff things will not compile anymore and everybody is forced to adjust their code - not a big deal in this case, but ...

Sticking to getInt(key), getString(key), getList(key), getDouble(key) will be better I would say.

On 11/30/2010 03:48 AM, Antonio Petrelli wrote:
2010/11/29 Adrian Tarau<[email protected]>:
If you would start doing specific gets/sets then you might want to do the
whole configuration like that otherwise it will become a hard mix of generic
gets and specific gets. And since it is an interface adding new specific
gets/sets will break the compatibility very easy.
No, I meant *only* specific gets.
But I don't think it breaks compatibility. The configuration interface
can evolve in two ways: add or remove methods.
About removing, with minor releases the methods cannot be removed,
only deprecated.
About adding, it is not a problem of previously-released versions of
Velocity, since the new "properties" will be ignored.

Sticking with loose get/sets it would be probably better. I'm using Jakarta
Configuration and injecting a Jakarta Configuration "sub-configuration"
wrapped on a Velocity configuration will work well for me :)
It works, but I disagree when you say "it works well", as in "it's
easy to understand by a programmer POV".
What I have in mind is something similar to Spring pure Java
configuration, without the annotations. Yes, XML works, but the pure
Java configuration works better :-D

Antonio

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to