Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lightweight ioc-Container for Java? [closed]

Coming from .NET, I'm used to Ninject, that's a small simple ioc-container. Is there anything simple and lightweight for Java?

The simpler the better!

like image 754
devoured elysium Avatar asked Mar 16 '11 21:03

devoured elysium


People also ask

Which IoC container is best?

You can waste days evaluating IOC containers. The top ones are quite similar. There is not much in this, but the best ones are StructureMap and AutoFac.

What is IoC container in Java?

An IoC container is a common characteristic of frameworks that implement IoC. In the Spring framework, the interface ApplicationContext represents the IoC container. The Spring container is responsible for instantiating, configuring and assembling objects known as beans, as well as managing their life cycles.

Is BeanFactory IoC container?

The Spring Framework comes with two IOC containers – BeanFactory and ApplicationContext. The BeanFactory is the most basic version of IOC containers, and the ApplicationContext extends the features of BeanFactory.

Should I use IoC container?

The most valuable benefit of using an IoC container is that you can have a configuration switch in one place which lets you change between, say, test mode and production mode. For example, suppose you have two versions of your database access classes...


1 Answers

Pico container or google-guice. See a comparison here.

Btw, few people will call spring "ligthweight", but it can be used as such with only the basic features. Hence it's included in the above comparison.

like image 151
Bozho Avatar answered Oct 14 '22 09:10

Bozho