I’m currently studying Spring and suddenly, I’ve got curious about DI
And my question is What’re the main reasons to use DI?
Sorry for Duplicate Question..
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
DI is automated, configurable way of instantiating graph of objects. From Spring in Action, Craig Walls, Ryan Breidenbach:
You may read answers on question :"What is dependency injection?". That way you’ll get clearer picture, what are the main reasons to use it.
And maybe take a look at that great article.