Comment by amcna...@google.com:

Another way to avoid doing work inside "configure()" is to move heavyweight object creation to Providers (in particular, avoiding toInstance bindings for nontrivial instances).

This means that if you want to write unit tests for the injector or modules, or if you do need to override bindings, you can safely assume those objects will not be created.

This isn't to say there's anything wrong with the Service approach (it's a great approach, in fact), but it might not make sense in all cases.

For more information:
http://code.google.com/p/google-guice/wiki/ModulesShouldBeFastAndSideEffectFree

--
You received this message because you are subscribed to the Google Groups 
"google-guice-dev" group.
To post to this group, send email to google-guice-dev@googlegroups.com.
To unsubscribe from this group, send email to 
google-guice-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-guice-dev?hl=en.

Reply via email to