Chapter 6: Practical Guice

Like any other cool new technology, Guice will be a viable solution only if it helps you solve real-life problems, like connecting to a database or interacting with the user through a web interface. By now, you can probably imagine how that would work in the Guice world, so let's take a look at how all the pieces fit together.

Requirements

In this chapter, we're going to discuss the Shopping List sample application. The goal of the application is to be able to manage daily or weekly shopping lists. The user thinks of something to buy on shopping day (like coffee or an iPod) and logs on to the application to add the item to one of the shopping lists. Here's the short list of requirements:

  • The user can log on to the ...

Get Google Guice: Agile Lightweight Dependency Injection Framework now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.