Google Guice: Agile Lightweight Dependency Injection Framework

Front Cover
Apress, Apr 23, 2008 - Computers - 192 pages

Guice (pronounced “Juice”) is the Jolt Award-winning, 100% Java icing on the cake of Java dependency injection. Unlike other popular dependency injection frameworks such as Spring, Guice fully embraces modern Java language features and combines simplicity with stunning performance and developer–friendliness.

Google Guice: Agile Lightweight Dependency Injection Framework will not only tell you “how,” it will also tell you “why” and “why not,” so that all the knowledge you gain will be as widely applicable as possible. Filled with examples and background information, this book is an invaluable addition to your knowledge of modern agile Java.

  • Learn simple annotation–driven dependency injection, scoping and aspect-oriented programming, and why it all works the way it works
  • Be the first to familiarize yourself with concepts that are likely to be included in a future Java EE or SE release (through JSR 299)
  • Get things done without having to write any XML
What you’ll learn
  • Find out why dependency injection frameworks solve your problems, and how Guice fills that gap
  • What Guice can do, can’t do and how to apply that knowledge
  • How Guice compares to popular alternatives like the Spring Framework
  • What the future has in store, including Guice IDE, the next Guice version and the standardization of Guice’s concepts through JSR 299
  • How you can build real–world, Guice–powered web applications using popular frameworks like Wicket or Struts 2
  • How to develop a full stack Guice/Struts 2/Hibernate application
  • What you can really do with modern Java
Who this book is for

This book is for professional Java developers who are interested in dependency injection and modern Java coding practices, and who want to tackle complexity with a simple, powerful, and high–quality solution that powers one of Google’s highest profile applications: AdWords. This may be an alternative to Spring for many.

Table of Contents
  1. Setting the Stage
  2. Enter Guice
  3. From Journeyman to Bob
  4. Aspect-Oriented Programming
  5. Integrating with the Web
  6. Practical Guice
  7. Guice Recipes
  8. The Future

What people are saying - Write a review

We haven't found any reviews in the usual places.

Other editions - View all

About the author (2008)

Robbie Vanbrabant is an experienced Java developer based in Belgium. In his professional life, he advises companies how to design and implement their Java-based solutions. Robbie has a broad interest in software that goes from platforms like Java and .NET to programming languages, API design, agile processes, and developer productivity. Following that interest, he recently discovered Google's Guice, a lightweight, elegant, and purely Java-based dependency injection framework. Since then, he's been one of the most active members in the Guice community and can often be found on the mailing list answering questions. To catch up with him online, you can visit his blog at

Bibliographic information