Java on Guice
Dependency Injection the Java Way
Bob Lee
Copyright 2007 Google Inc.
Does this sound like you?
• “My application has 100% automated test coverage.”
• “We’ve broken our code down into independently
reusable and maintainable modules.”
• “I go from coding, to compiling, to testing, and back to
coding again in 5 seconds flat.”
Copyright 2007 Google Inc.
What can dependency injection do for me?
• Easier testing
• More decoupling
• Less boilerplate
• Better maintainability
A Simple Example