I'm just starting to play around with Google Guice as a dependency injection framework and am attempting to retrofit it to a small to medium size project I recently wrote. I understand the basics of how Guice works, but am a bit vague on some of the approach details. For example:
1) Modules are used to define your bindings, which are then fed into the injectors. Do you tend to put everything into one module or do you tend to break things down into lots of smaller modules?
2) Do you have one injector at the top level which injects the entire object tree or multiple injectors dotted about which only inject those dependencies you really need to inject? I'm thinking here of my own code base which, of course, has many dependencies, but only a small handful which I need to control during testing.
3) I'm slightly stuck on the best way to get my system/integrations tests using test-environment-only modules instead of the production verions. This question is likely implementation specific, but I'm curious what methods people use. For reference, my app is a servlet based web app.
Any other pointers?