Comment by [email protected]:

@hob and volpegab,

You guys should read up on dependency injection. Actually, just watching the video that's on the home of this project page will clarify why overuse of singletons and factories are a Bad Thing(tm)... or at least a less desirable thing. You can also read the [http://code.google.com/p/google-guice/wiki/Motivation motivation] article.

In essence, you're tying your code down to a concrete specific implementation (tight coupling), significantly narrowing the contexts in which it can be reused. It also makes testing difficult, to say the least because if you have two components that are tightly-coupled, you will probably have to test them both at the same time, or you at least you won't be able to test one without having the other around too.

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

--
You received this message because you are subscribed to the Google Groups 
"google-guice-dev" 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-dev?hl=en.

Reply via email to