In a project that uses a DI framework, should you NEVER use the 'new' operator?

Posted by Chuck on Stack Overflow See other posts from Stack Overflow or by Chuck
Published on 2010-03-28T16:31:09Z Indexed on 2010/03/28 16:33 UTC
Read the original article Hit count: 202

I'm trying to wrap my head around Dependency Injection.

One of the things I'm confused about is whether all of your object instantiation needs to be controlled by the DI framework (Spring, Guice, etc).

Or, if not, how do you determine which objects are instantiated by the framework and which objects are instantiated with the new operator?

© Stack Overflow or respective owner

Related posts about dependency-injection

Related posts about java