A simple dependency injection component

Guice is alternative to Spring framework except life cycle management.

I like Guice framework over Spring for the following reason.

  1. Developer friendly. For example by seeing annotation any developer can understand the container will inject the object. Whereas in Spring, no body can guess why a setter method exists.
  2. Guice is much better than Spring framework because of the simplicity and less feature.
  3. Provides easy way to implement method interceptor.
  4. Another big advantage is no XML. It is not easy to debug XML document. (Remember EJB 2.0 failure) Developers are more comfortable to write code in Java rather than in XML.

The following links gives performance result of Guice.

http://www.javalobby.org/articles/guice-vs-spring/

http://gorif.wordpress.com/2007/07/05/google-guice-1000-faster-than-spring/

Advertisements

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

%d bloggers like this: