On 24 jul, 10:17, Kwhit <[email protected]> wrote:
> Yes I found myself making the same mistake outlined by Gary. Start
> thinking of your core entities in your design as standalone.  Have
> @Inject public MyClass(...) constructor that will be given all the
> dependencies you need. Then you can unit test it.

Ahhhh... I see now.

>From main() method I can inject the biggest pieces of the application
in the constructor, and make this pieces get injected with his own
components... Ok, it's some kind of "thinking reverse": it's like the
componets already are there and they are standalone components.

Hmmm... this forces you to have a clean dependency map of the
application in mind... good.

Btw, I've been a bit lazy; for my 2nd question I think AssistedInject
will be what I'm looking for. I should have googled a bit more.

Thanks Gary and Kwhit
--~--~---------~--~----~------------~-------~--~----~
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