Two years ago, Bob Lee and Kevin Bourrillion open sourced Google Guice 1.0, a lightweight Java dependency injection framework. Guice takes the pain out of writing and maintaining Java applications big and small. Guice has gained a great deal of traction both inside and outside of Google. Almost every Java-based application at Google is also a Guice-based application; the list includes AdWords, Google Docs, Gmail, and even YouTube. Open source users run Guice in everything from file-sharing software to ATMs. They've even written two books about this Jolt-award-winning framework.In addition to the user-facing features mentioned by Jesse, Guice 2 provides an extensive service provider API that enables first class extensions like James Strachan's GuiceyFruit and makes writing tools like Guice Grapher a snap. Thanks, Jesse, for all of your hard work on this release. Special thanks goes to our users for being patient and building a vibrant community around Guice. If you're interested in learning more, don't miss Jesse and Dhanji's Guice 2 talks at Google I/O and JavaOne.
Today, we're releasing Guice 2. The minimally-sized API extensions introduced by Guice 2 will have a majorly positive impact on the size and maintainability of your code. We closely scrutinized each addition, carefully balancing maintainability and flexibility. Here are a few of my favorite new features:Guice works with Java SE, Java EE, Google App Engine, Android, and even Google Web Toolkit (via GIN).
- Provider methods eliminate the boilerplate of manually-constructed dependencies.
- Module overrides allow you to tweak a production module for a unit test or QA deployment.
- Private modules enable compartmentalized configuration, simplifying module reuse.
References
Guice 2.0 Release Notes
Downloads
User's Guide
Javadoc
By Jesse Wilson, Google Developer Team
-
Announcing Guice 2! (11 messages)
- Posted by: Bob Lee
- Posted on: May 20 2009 10:26 EDT
Here's Jesse's announcement from the Google Code Blog:Threaded Messages (11)
- Great job by Undisclosed Undisclosed on May 20 2009 11:01 EDT
- Re: Announcing Guice 2! by Otengi Miloskov on May 20 2009 13:51 EDT
- Re: Announcing Guice 2! by Dave Bigelow on May 20 2009 18:16 EDT
- Re: Announcing Guice 2! by shawn spencer on May 20 2009 20:00 EDT
- Re: Announcing Guice 2! by David McCoy on May 20 2009 22:52 EDT
-
Re: Announcing Guice 2! by shawn spencer on May 21 2009 12:37 EDT
- Re: Announcing Guice 2! by John Peng on May 25 2009 02:22 EDT
- Why do we need Guice ? by vikram asdf on July 18 2009 10:55 EDT
-
Re: Announcing Guice 2! by shawn spencer on May 21 2009 12:37 EDT
- Re: Announcing Guice 2! by Pavel Vyazankin on May 21 2009 05:30 EDT
- Re: Announcing Guice 2! by Stuart McCulloch on May 21 2009 08:11 EDT
- Re: Announcing Guice 2! by David McCoy on May 20 2009 22:52 EDT
- Congrats and Thanks!! by Jamie Swain on May 23 2009 02:54 EDT
-
Great job[ Go to top ]
- Posted by: Undisclosed Undisclosed
- Posted on: May 20 2009 11:01 EDT
- in response to Bob Lee
Great release. AssistedInject and hierarchical injectors were long awaited, and it is nice to have them. Just upgraded to 2.0 and deleted a bunch of now unnecessary code. It works like a cherm. -
Re: Announcing Guice 2![ Go to top ]
- Posted by: Otengi Miloskov
- Posted on: May 20 2009 13:51 EDT
- in response to Bob Lee
Guice is Awesome!!. Im using it on a project and also with IntelliGuice on Intellij is very good. Congratulations to the team for this release is very important. This is a truly lightweight DI framework. No more no less. -
Re: Announcing Guice 2![ Go to top ]
- Posted by: Dave Bigelow
- Posted on: May 20 2009 18:16 EDT
- in response to Bob Lee
Interesting framework, but how many people are actually using it? I did a cursory search on Dice and didn't find much -
Re: Announcing Guice 2![ Go to top ]
- Posted by: shawn spencer
- Posted on: May 20 2009 20:00 EDT
- in response to Bob Lee
what is google's idea behid promoting this ? This guice is just Ioc stuff. Why would i use soemthing in my application just for ioc and still depend on other frameworks like spring for mvc, jdbc, transactions, jms , web services etc. why wotn i just use soring Ioc as well so i have Everything with high cohesion and low coupling ? -
Re: Announcing Guice 2![ Go to top ]
- Posted by: David McCoy
- Posted on: May 20 2009 22:52 EDT
- in response to shawn spencer
what is google's idea behid promoting this ?
Yeah! soring is great!
This guice is just Ioc stuff.
Why would i use soemthing in my application just for ioc and still depend on other frameworks like spring for mvc, jdbc, transactions, jms , web services etc.
why wotn i just use soring Ioc as well so i have Everything with high cohesion and low coupling ? -
Re: Announcing Guice 2![ Go to top ]
- Posted by: shawn spencer
- Posted on: May 21 2009 00:37 EDT
- in response to David McCoy
i meant spring. :)what is google's idea behid promoting this ?
This guice is just Ioc stuff.
Why would i use soemthing in my application just for ioc and still depend on other frameworks like spring for mvc, jdbc, transactions, jms , web services etc.
why wotn i just use soring Ioc as well so i have Everything with high cohesion and low coupling ?
Yeah! soring is great! -
Re: Announcing Guice 2![ Go to top ]
- Posted by: John Peng
- Posted on: May 25 2009 14:22 EDT
- in response to shawn spencer
That's okay. I use Blackberry storm too. :-) -
Why do we need Guice ?[ Go to top ]
- Posted by: vikram asdf
- Posted on: July 18 2009 10:55 EDT
- in response to David McCoy
Why do we need another web-framework when all the features such as Dependency Injection, Annotations, Modularize development of code, etc. can be done using Spring Framework and Maven tools. I have also put this in my blog http://www.vikramark.com/2009/07/why-do-we-need-guice.html -
Re: Announcing Guice 2![ Go to top ]
- Posted by: Pavel Vyazankin
- Posted on: May 21 2009 05:30 EDT
- in response to shawn spencer
what is google's idea behid promoting this ?
+1 Is there any chance not to implement Guice interfaces?
This guice is just Ioc stuff.
Why would i use soemthing in my application just for ioc and still depend on other frameworks like spring for mvc, jdbc, transactions, jms , web services etc.
why wotn i just use soring Ioc as well so i have Everything with high cohesion and low coupling ? -
Re: Announcing Guice 2![ Go to top ]
- Posted by: Stuart McCulloch
- Posted on: May 21 2009 08:11 EDT
- in response to Pavel Vyazankin
Well if the "atinject" JSR is successful you could use standard interfaces and switch between Spring and Guice configurations as you feel like it (or at least with less pain than at the moment). Even now with Guice 2 you can use the new injection hooks to support your own custom injections, like James Strachan does for Spring and @Resource annotations, etc. over at GuiceyFruit.what is google's idea behid promoting this ?
This guice is just Ioc stuff.
Why would i use soemthing in my application just for ioc and still depend on other frameworks like spring for mvc, jdbc, transactions, jms , web services etc.
why wotn i just use soring Ioc as well so i have Everything with high cohesion and low coupling ?
+1
Is there any chance not to implement Guice interfaces? -
Congrats and Thanks!![ Go to top ]
- Posted by: Jamie Swain
- Posted on: May 23 2009 02:54 EDT
- in response to Bob Lee
You guys have done a great job on this! I've been enjoying the Feb. snapshot, and am happy to now download this GA release :) Guice is the best!! Thanks for all your hard work Bob and everyone else!