History and Theory of GIN
Several years ago, the Google Brainiacs delivered a dependency injection framework called Guice. The idea behind Guice is to let the framework create all of your dependencies and you simply tell it what types of objects you would like to have to do your job. The Guice system will determine the correct implementation classes for your requested interfaces and give them to you when appropriate.
This works extremely well in production mode, but it actually gives other benefits. This way of development helps you to design your software in a much more decoupled and modular way. You begin to lean on interfaces instead of concrete classes which is usually a very good thing. Because you are dependent on interfaces, your code becomes much easier to test.
Now fast forward a bit and you find yourself in a development group writing large systems with the Google Web Toolkit. You have read all about how Guice makes life easier and you are struggling to write unit tests for your GWT based code. You think to yourself, “Geez, wouldn’t it be nice if I could just use Guice?” Now you can do just that, GWT GIN (GWT INjection) brings automated dependency injection into the client side of development. It is based on Guice and uses the same annotations for its dependency injection. Continue reading
