> Therefore I want to start as few modules as possible for some of my unit
> tests. This results in many, many small modules. At the moment I have 18
> production modules (and 5 mock modules) for a project with around 300
> classes.
> Is this normal? How do you solve that problem?

I don't know about other people, but the system that I'm refactoring
to use Guice has I believe 115 or so. And that's a piece of cake. I
wouldn't see a problem with even thousands of modules.

> I found out that circular dependencies between modules are really hard
> to find. But those must be broken to be able to start just small
> portions of the application.
> How do you solve that issue?

I implemented a classpath scanner that reads Guice annotations and
binds eagerly, for the sole purpose of finding such problems either
(it'll be turned off in production probably). Then for the few
circular dependencies we find, we either rewrite the modules so that
they don't depend on each other (introduce a third module) or we
simply introduce an interface so that Guice can proxy.

Eelco

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

Reply via email to