Dependency Injection has been around for a while, and many teams are refactoring their applications to use DI. But it can be a struggle. In this article, Paul Hammant explains the route to take to move an existing application from a nest-of-singletons ...
In what I hope will be the first of several articles about Guice, a new lightweight dependency injection container from Bob Lee and Kevin Bourillion from Google, this article examines the simplest and most obvious use case for the Guice container, for mocking or faking objects in unit tests. In future articles I will examine other, more ambitious areas where it can be used, including dependency elimination in large code bases.