7/18/2009

Why do we need GUICE ?

I was looking at one of the tech videos on GUICE framework. As I am not very familiar with this framework and I had some time on hand , I decided to go ahead and see this presentation.

Here are the important features discussed for Guice in this presentation

1. Dependency Injection
2. Modularize Code
3. Guice Servlet dispatcher
4. AOP – for transactions
5. Introspection for various Modules to see if dependency is broken

We can achieve all this features using Spring Framework and Maven. I guess maven is excellent tool to develop code in Modular fashion. You can divide your application in modules and these can be used across any other applications (if well defined). Plus Spring Framework provides the pretty good dependency injection and AOP.

So overall I am not sure as “Why GUICE ?”, when we can get the better things done through already well established framework. May be I will need to do some hands on to be able to find a better answer to this question


2 comments:

swankjesse said...

Guice is designed to make developer productivity scale from small apps (commandline, mobile, GWT) thru large apps (Google Wave, Blogger, LimeWire).

In my understanding, Spring is best suited for a far narrower class of application: enterprise apps. Next time you're writing an app that won't live in J2EE, Guice will be there for you!

Vik said...

Thanks swankjesse for the input, I have to still find some time to play around with Guice !! Hopefully sooner than later :).