The Guice user guide is also very good at describing the benefits of
injection.

http://code.google.com/docreader/#p=google-guice&s=google-guice&t=Motivation

I also like the level of complexity that Guice introduces (nearly zero).  My
major problem with Spring is that it introduces and mixes a bunch of
different concepts at the same time.  This makes it hard to take a small
bite.  Guice looks like a small bite and just defining constructors for
hand-done injection is a still smaller bite.

On Sun, Jan 17, 2010 at 6:59 PM, Drew Farris <drew.far...@gmail.com> wrote:

> However, we can support the concept of injection without having to
> commit to using one framework or another. Every class is instantiated
> somewhere, so manual injection can be performed sans framework at that
> point. Speaking specifically for this case, the contract would be that
> anything that requires a RNG gets it injected by the class that
> instantiates it instead of obtaining one through some method of its
> own.
>
> There's a great series of posts that describe the advantages to this
> approach when it comes to testability that's reachable from:
> http://misko.hevery.com/2008/09/10/where-have-all-the-new-operators-gone/
>



-- 
Ted Dunning, CTO
DeepDyve

Reply via email to