Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dependency Injection Usage

 
Vinod Kumar Kashyap
Greenhorn
Posts: 11
Eclipse IDE Java jQuery
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to know that dependency Injection is only associated with Spring only.
Or it can be used in other frameworks also like Struts.

It can also be used alone?

Thanks,
Vinod
 
Dhanji Prasanna
author
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No it is incorrect to say it is associated with Spring only. In fact at Google we mainly use Guice and use it in various applications ranging from the web to other backend services.

You can use either Spring or Guice with or without Struts2, Stripes, Wicket or most web frameworks. Struts2 and Wicket have pretty good support for integrating Spring or Guice.

Some web libraries, like Tapestry, provide their own DI systems.

Dhanji.
 
Vinod Kumar Kashyap
Greenhorn
Posts: 11
Eclipse IDE Java jQuery
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Thanks for the reply.

I am confused for sometime about the DI and not able to gather information i.e. what is to be studied and why do study it.
Does it plays a enormous role in the programming? I am Java developer and love to gain info on new technologies.
Does DI is a new concept and can it help me to solve my problems?.
Will it help to increase my performance in the field of Java?
Does it helps me to be more productive?

Thanks,
Vinod
 
Dhanji Prasanna
author
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes to everything =)

I'd encourage you to download this green paper my book (free pdf download at http://manning.com/free/green_prasanna.html ) and to watch this introductory talk: http://www.youtube.com/watch?v=hBVJbzAagfs

They go into a lot more detail and will answer your questions with concrete examples.
Thanks,

Dhanji.
 
Vinod Kumar Kashyap
Greenhorn
Posts: 11
Eclipse IDE Java jQuery
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Dhanji,

I will read the green paper and then ask you a question if any.


Thanks,
Vinod
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic