16.2. Guice—a Java dependency injection framework

There are several such DI frameworks in the world; one is called Guice, and we’ll be using that in this book. Guice[2] is a popular Java DI framework that we can easily use for any server-side Java code we might have. Importantly for us, Guice underpins the GIN framework that we need to use for GWT client-side dependency injection.

2http://code.google.com/p/google-guice/.

We’ll discuss why we need an additional framework for GWT client-side code a little later, but first we’ll use Guice to go through dependency injection frameworks in some more detail. After all, it can still be used for any Java server-side code we have, and the principles we’ll examine in Guice are in GIN.

Although you ...

Get GWT in Action, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.