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.
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: