title: Factory class vs Spring DI
body: <p>As per my understanding both Factory class and  Spring DI follows the Dependency injection. I mean  in both the cases external entity is used to push the dependency. <strong>Right?</strong>
  My question is which one i should go for  between factory classes and Spring DI when my intention is just to get the objects . Assume i don't want any other features like aop, dao support etc. Only purpose is to get the objects either from Factory class or Spring DI. Which one is preferable.</p>
  
  <p>on some site  read this statement </p>
  
  <p>DI loosely coupled and less intrusive in comparison to Factory classes</p>
  
  <p><strong>But could not get how spring  DI loosely coupled and less intrusive than factory classes?</strong>
  in both the cases we have to insert some kind of get object code in our core program .</p>