Why is Google Guice so popular for Dependency Injection over Spring?

Guice is simple, easy to use, lightweight and focused in DI.

Spring is not only DI and became kind of heavy. If you are not using hibernate/jpa, quartz, AOP and many other tools that spring makes an easier use of (eg @Transactional), you might not need it.

Say for example that you are using AppEngine, spring is not necessary and  using Guice or Pico can decrease your app start time by half.

Answer by Bruno Fuster:

Guice is simple, easy to use, lightweight and focused in DI.

Spring is not only DI and became kind of heavy. If you are not using hibernate/jpa, quartz, AOP and many other tools that spring makes an easier use of (eg @Transactional), you might not need it.

Say for example that you are using AppEngine, spring is not necessary and  using Guice or Pico can decrease your app start time by half.

Why is Google Guice so popular for Dependency Injection over Spring?

Advertisements

Leave a comment

Filed under Life

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s