It would be helpful to see an example that injects "one root object",
and another that illustrates the following line:
"...your application should ideally have one class (if that many)
which knows about the Container,..."
I'm new to dependency injection, so it may be obvious to others, but
it is not clear to me how I could not have at least one class that has
knowledge of the container.
Isaac
--
Random Geek Stuff: http://l0wbyt3.blogspot.com
Great work on the usage guide. The one area I would really like to see
a simple example for is "Bootstrapping Your Application".
It would be helpful to see an example that injects "one root object",
and another that illustrates the following line:
"...your application should ideally have one class (if that many)
which knows about the Container,..."
I'm new to dependency injection, so it may be obvious to others, but
it is not clear to me how I could not have at least one class that has
knowledge of the container.
On Feb 23, 8:46 am, "Bob Lee" <crazy...@crazybob.org> wrote:
> On 2/22/07, Isaac Sparrow <isaac.spar...@gmail.com> wrote:
>
> > Great work on the usage guide. The one area I would really like to see
> > a simple example for is "Bootstrapping Your Application".
>
> > It would be helpful to see an example that injects "one root object",
> > and another that illustrates the following line:
>
> > "...your application should ideally have one class (if that many)
> > which knows about the Container,..."
>
> > I'm new to dependency injection, so it may be obvious to others, but
> > it is not clear to me how I could not have at least one class that has
> > knowledge of the container.
>
> If I use Struts or WebWork for example, all my actions are injected, so my
> application itself has no knowledge of the container.
>
> If you're writing a backend service, you could accomplish the same thing by
> injecting all your service implementations at the framework level.
Ah. I get it now.
>
> BTW, please hold off on blogging about Guice. We aren't going "public" just
> yet. ;)
I'll remove the entry. Sorry about that.
Isaac
>
> Bob
I'll remove the entry. Sorry about that.