What is dependency injection

0 votes
My question is what is dependency injection? Also when and why should it or should not be used? Any leads would be beneficial for me.
Feb 8 in Others by Rahul
• 8,980 points
29 views

1 answer to this question.

0 votes

According to James Shore, the term “Dependency Injection” is nothing but a 25 dollar term in exchange for a 5% concept. In other words, when the instance variables are given to an object. It basically, provides the required objects that an object needs which are its dependencies instead of constructing themselves. This allows dependencies to be stubbed out and is hence, a very useful technique for testing. Constructor and Setter injection are one of the many ways in which dependencies can be injected into objects.The use of specialized dependency injection framework also works but might not be required in order to have a dependency injection. Detecting and passing dependencies explicitly is equally good as an injection as an injection by the framework. 
 

answered Feb 8 by Soham
• 8,730 points

Related Questions In Others

0 votes
1 answer

What is the difference between hadoop and google analytics ?

I will try and answer this as ...READ MORE

answered Aug 22, 2018 in Others by Frankie
• 9,830 points
713 views
+5 votes
6 answers

what is artificial neural network?

Machine Learning is a field of computer ...READ MORE

answered Dec 17, 2018 in Others by Raghumishra
• 240 points
726 views
+1 vote
1 answer

What is the difference between Dark Web and Deep Web?

The content that which you cannot find ...READ MORE

answered Feb 6, 2019 in Others by Priyaj
• 58,060 points
352 views
+1 vote
2 answers

What is the different between xml and json?

These are the differences:   It is JavaScript Object ...READ MORE

answered Feb 7, 2019 in Others by Junaid
330 views
0 votes
0 answers

What is ADT? (Abstract Data Type)

Can someone explain to me what ADT ...READ MORE

3 days ago in Others by Kichu
• 16,250 points
5 views
0 votes
1 answer

what is cloud computing with example

In simple terms, cloud computing is storing ...READ MORE

answered Feb 2 in Cloud Computing by Edureka
• 5,760 points
125 views
0 votes
1 answer

What is the difference between tree depth and height?

To answer your question, you will have ...READ MORE

answered Feb 9 in Python by Rahul
• 8,980 points
25 views
0 votes
1 answer
0 votes
1 answer

What is Mocking?

The meaning of the word refers to ...READ MORE

answered Feb 8 in Others by Soham
• 8,730 points
25 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP