Ok, then let me reply here, too (though there was a "factory" thread
earlier;-)

Dependency Injection and CDI certainly benefit from non-static methods
quite a bit.

Werner

On Thu, Dec 4, 2014 at 5:32 PM, Oliver B. Fischer <o.b.fisc...@swe-blog.net>
wrote:

> I don't like the abuse of static methods. In one of the earlier discussion
> I proposed
>
>     new Configuration()
>
> Static methods are great for small helper methods. But they become
> problematic if you would like to test code and to substitute their
> funtionality with mocks.
>
> Best,
>
> Oliver
>
> Am 04.12.14 15:45, schrieb Werner Keil:
>
>  Hi,
>>
>> Probably more important than config subsystems in JSR 107 or Log4J 2
>> (though it altogether got a really good rewrite making any effort for a
>> "Logging JSR" by some people almost pointless;-) seems a massive redesign
>> and recent activity of Apache Commons Logging 2:
>> http://commons.apache.org/proper/commons-configuration/index.html
>>
>> Anybody had a look at that?
>>
>> Apache certainly has a very multicultural ecosystem, look at Struts vs.
>> OpenFaces vs. Wicket vs. Tapestry and who knows how many (Web MVC)
>> projects
>> all exist, so why not have at least 2 or 3 for configuration.
>>
>> Something noteworthy is, that Commons Configuration 2 refrains from any
>> static factory.
>> Even a class sounding like it was static such as Configurations (in a new
>> "fluent" package) works like this:
>>   Configurations configurations = new Configurations();
>> PropertiesConfiguration config = configurations.properties(new File(
>>           "config.properties"));
>>
>> Werner
>>
>>
> --
> N Oliver B. Fischer
> A Schönhauser Allee 64, 10437 Berlin, Deutschland/Germany
> P +49 30 44793251
> M +49 178 7903538
> E o.b.fisc...@swe-blog.net
> S oliver.b.fischer
> J oliver.b.fisc...@jabber.org
> X http://xing.to/obf
>
>

Reply via email to