11/22/2017, 10:23 AM
I would use Guice, I feel it is simpler to configure. Dagger is more performant, but requires code generation AFAIK.


11/22/2017, 9:25 PM
This is correct, but as somebody who has used guice extensively, I'll start most/all of my future projects with dagger. The code dagger generates is very high quality, and it means you dont have what is effectively the opaque block that is guice when your debugging. ofc, it incurs all the downsides of generated code, which are extensive
infact its even worse, because if you think about ANTLR generated code or a SOAP proxy, both of those are kind of call-stack bottoms (well, aside from antlr visitors, but my point remains valid), they're generally not particularly heavy on IOC, so you call these generated code blobs without too much concept of callbacks or having them above you on the callstack. With dagger, it is likely that your applications entry point (be it a war bootstrap method or a static-void-main) will literally just dump the problem on IOC, requiring that your entire codebase be weaved with calls to the generated code.