I have watched that, and I don't see why DI by hand is any worst than
Guice.  Its solves all your main problems with testability.

The ClientFactory in your DI by hand example is very similar to a
Provider in a Module for the Injector.

So how is Guice any better than DI by hand?

On Sep 11, 5:17 pm, "Bob Lee" <[EMAIL PROTECTED]> wrote:
> On Thu, Sep 11, 2008 at 5:10 PM, Pyrolistical <[EMAIL PROTECTED]> wrote:
>
> > This is my point.  If using new breaks Guice, then what's the point of
> > Guice.
>
> > If I need to pass an Injector around to create classes, why don't I
> > just pass in the dependencies when I use the new constructor?  I can
> > just replace the Injector with a class that holds references to my
> > dependencies.  I would create this class at main just like configuring
> > a module.
>
> > If I did that, what's the point of Guice?
>
> http://crazybob.org/2007/06/introduction-to-guice-video-redux.html
>
> Bob
--~--~---------~--~----~------------~-------~--~----~
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