This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DI Queries

 
Soniya Ahuja
Ranch Hand
Posts: 83
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
In my current project we are using a lot of Dependency Injection. I need to know

1. When should setter injection be used and when should we go for constructor injection?
2. Should Programming to Interfaces be used always for DI?
3. How can we program to ask our container to inject dependencies for us (kike in Spring)?

Any help appreciated

Thanks in advance.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33696
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
#1 is covered in this thread

#2 - Very few things are "always" true in programming.

#3 - Use Spring?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic