I’ve recently studied about Guice in a University course, and have seen the Google I/O video about it. In the video, they claim to use it in every Google project, including Wave, etc. I was wondering – is Guice really that ubiquitous? Is it really a must-know-must-use for programmers in Java? Should I always use it over a factory?
Thanks
Outside of Google – no, not really. I’m not saying it’s not a good product, it just doesn’t seem very widely used right now. There are other, more established frameworks out there that provide dependency injection, like Spring or EJB. The main difference is that Guice only does dependency injection.
Of course not. Dependency injection is a useful pattern, but as with all useful tools, there’s a right and a wrong time to use it.