What is Dependency Injection? | Why | Spring

Ғылым және технология

Spring and Microservices Live Course : bit.ly/springmslive
Coupon: TELUSKO25 (25% Discount)
Industry-Ready Java Spring Microservices Developer Live : bit.ly/JavaMS2
Complete Java Developer Course : bit.ly/Comp-Java-Dev-2
Coupon: TELUSKO20 (20% Discount)
For More Queries WhatsApp or Call on : +919008963671
website : courses.telusko.com/
Instagram : / navinreddyofficial
Linkedin : / navinreddy20
TELUSKO Android App : bit.ly/TeluskoApp
Discord : / discord
Spring Dependency Injection.
Practical : goo.gl/VZZnDT
In software engineering, dependency injection is a technique whereby one object (or static method) supplies the dependencies of another object. A dependency is an object that can be used (a service). An injection is the passing of a dependency to a dependent object (a client) that would use it. The service is made part of the client's state.[1] Passing the service to the client, rather than allowing a client to build or find the service, is the fundamental requirement of the pattern.
-wikipedia
Dependency Injection is a design pattern.
In this video we will see :
- What is Dependency Injection
- Why it is so famous
- An example of Dependency Injection explaining the process.
- Object dependency
- Loose Coupling
- Tight Coupling
- Dpendency injectction container
- Spring container
- Spring Boot
- @Component
- @Autowired
- Testing
- Mock Object
- Maintenance
Java and Spring Framework For beginners with Spring Boot : - bit.ly/3LDMj8D
Java Tutorial for Beginners (2023) :- bit.ly/3yARVbN
Editing Monitors :
amzn.to/2RfKWgL
amzn.to/2Q665JW
amzn.to/2OUP21a.
Subscribe to our other channel:
Navin Reddy : kzread.info/dron/xmk.html...
Telusko Hindi :
kzread.info/dron/itz.html...
#spring #Dependencies
Donation:
PayPal Id : navinreddy20
Patreon : navinreddy20
www.telusko.com/contactus

Пікірлер: 276

  • @dhananajaykrishna8259
    @dhananajaykrishna82593 жыл бұрын

    You're not just a programmer but also an awesome story teller. When asked about dependency injection people make it so complex that you start scratching your head.... But you explained like it was a piece of cake. 🙏

  • @stifflery
    @stifflery5 жыл бұрын

    Big brother, you speak so beautifully your words directly injects into my brain without an error at all. Everything becomes so comprehensible when you explain it.

  • @mahmudhr2760
    @mahmudhr27605 жыл бұрын

    Sir, from the beginning of my programming you have been with me. Thank you so much for your instructions !

  • @RAJATTHEPAGAL
    @RAJATTHEPAGAL6 жыл бұрын

    Really good explanation I covered Software Engineering recently + have been using Spring and Angular and never actually realised about this loosely coupled idea. Nice philosophy behind how project should be managed. Also the part of testing that loose coupling makes it easier to test, never realised that :-D ...... Great explanation a bit of practical would be plus ...

  • @AnthonyHernandez-tb4cu
    @AnthonyHernandez-tb4cu2 жыл бұрын

    I have watched more of your videos to learn SWE topics than I can count. You have been instrumental in allowing me to understand these concepts intuitively. Big thanks!

  • @doglover4621
    @doglover46215 жыл бұрын

    One of the best KZreadr in teaching. Seriously I learned a lot from this channel

  • @karthickd8251
    @karthickd82515 жыл бұрын

    My day starts with Telusko

  • @yosukeyoh
    @yosukeyoh2 жыл бұрын

    this is the best explanation about dependency injection in Spring ive heard so far. Simple but I can understand it so well! Thank you!

  • @ShivamSingh-yl7jo
    @ShivamSingh-yl7jo3 жыл бұрын

    Best tutorial on dependency injection. Finally, I got what it really is.

  • @gregc6107
    @gregc61074 жыл бұрын

    At it's core, dependency injection centralizes the creation of concrete objects that your client (meaning your code) uses and can use in many places. This provides many benefits, first you are able to easily switch out the implementation, you are able to easily test the implementation, and you are able to wrap or manipulate how you want it to instantiate. Whether it be wrapping authentication around it or adding pre and post processing, or auditing/logging to it and you can do this retroactively in the entire system in a very easy manner.

  • @krishnabangari9287
    @krishnabangari92875 ай бұрын

    Man, 5 years old video and still the best explanation about dependency explanation. This guy truly knows the subject, and he knows which example to pick to explain what topic. He has the teaching spirit in him. Hands down the best youtube channel. whenever, i have a doubt i come here, dang the concepts are much clear. Kudos to you brother.

  • @stevensmith5626
    @stevensmith56262 жыл бұрын

    Fantastic explanation that takes away the confusion. We tend to use such big words when a simple explanation is the best way. I have been doing this concept since 1975 and it always amuses me when the industry comes up with a new concept that really is just doing good programming with a different word. Great job!

  • @dpatel4362
    @dpatel43625 жыл бұрын

    Thanks for a very thorough and simple explanation. Your tutorials are addictive. God bless you.

  • @hinafraz528
    @hinafraz5284 жыл бұрын

    thanks for using classes on screen. got some idea of the concept.

  • @srijan5298
    @srijan52985 жыл бұрын

    Sir i'm a student of Cdac and even teachers here, also dont explain concepts like this. Thankyou sir❤

  • @iarpanbose
    @iarpanbose2 жыл бұрын

    Im 7+ yr experience in java and spring and i always screwed up the defination of dependency injection in the interviews 🤣

  • @dibyaranjanparida6666

    @dibyaranjanparida6666

    4 ай бұрын

    Hlo bhai

  • @SachinSingh-sm7yg
    @SachinSingh-sm7yg6 жыл бұрын

    Sir You're a Greate Teacher.

  • @vladanulardzic5859
    @vladanulardzic58596 жыл бұрын

    Excellent explanation based on real practical example ! Thank you for sharing this valuable knowledge. Vladan Ulardzic

  • @sagarkapasi099
    @sagarkapasi0996 жыл бұрын

    This is the first time i understood dependency injection and the jargons related to it! Thanks.

  • @sidique5269
    @sidique52694 жыл бұрын

    Great Navin Sir you are always there to help me ...no words for this kind of explanation

  • @urvashisharma7415
    @urvashisharma74153 жыл бұрын

    ive been wandering around for days trying to find a proper explanation for DI...and although im focussed on DI in Dart this video was the BEST to understand what it means...thank you very much sir

  • @dhanush4422
    @dhanush4422 Жыл бұрын

    now i understand dependecy injection. what a great examples you use sir. easily understandable even for layman

  • @neerarjayan5957
    @neerarjayan59575 жыл бұрын

    You are the God of Java dude.. I was searching this explanation for a whole week and i got that within 8 mins from your video. Thanks a lot.

  • @AdamVigas
    @AdamVigas Жыл бұрын

    This guy is teaching me everything...i am not even browsing youtube. Once i find this guy i go ahead...and it always work. Best teacher

  • @piyushbhuva9975
    @piyushbhuva99752 жыл бұрын

    man, the passion and joy of teaching in this guy's eyes is sight to behold...

  • @ramsciutube
    @ramsciutube5 жыл бұрын

    Marvelous teaching style. Superb, Marvelous, Mind blowing.

  • @arindamroy7671
    @arindamroy76712 жыл бұрын

    Comprehensive and relatable. Nice analogies to explain the concept. Thanks Navin !

  • @ravimule1924
    @ravimule19245 жыл бұрын

    I saw so many video's and article about DI but still somewhere i'm confused but you solve it using very simple way...Thanks

  • @felipevillarroel6259
    @felipevillarroel62594 жыл бұрын

    Thank you for this clarification, I understood it completely!

  • @specialk2720
    @specialk27205 жыл бұрын

    This guy, men you are a good teacher. I don't know if you know David J. Malan from Havard? You and that guy are my best teachers of all time. Good job!

  • @hirenvadher2610

    @hirenvadher2610

    4 жыл бұрын

    I know David

  • @awaisjamil5713
    @awaisjamil57136 ай бұрын

    I am thankful to you, I remember after graduation your videos were the source of preparation material for me for interviews and I landed a job. Respect from Pakistan.

  • @IreshDissanayakaM
    @IreshDissanayakaM5 жыл бұрын

    As always, I understood the concept. Thank you!

  • @chinmaydas4053
    @chinmaydas40536 жыл бұрын

    How great teacher you are.. Lots of love and respect sir.. Great topics.. we need practical implementations of all these concepts in projects..

  • @chinmaydas4053

    @chinmaydas4053

    6 жыл бұрын

    Thanks for reference.. I have watched the video.. greatly explained sir..

  • @chinmaydas4053

    @chinmaydas4053

    6 жыл бұрын

    Sir i'm confused wheather i should learn new java10 features like var, garbage collectors etc or it's good or bad and future updates of java bcz oracle now saying many things... Please sir.. make a complete video on all these topics.. would be helpful..

  • @drinkeatandthink
    @drinkeatandthink5 жыл бұрын

    this is awesome...!♥️God bless you...!🙌🏻

  • @RameshJothimani
    @RameshJothimani4 жыл бұрын

    A simple and an excellent explanation. Thank you very much !

  • @Akki31
    @Akki316 жыл бұрын

    Very good examplaination sir about dependency injection... thanks for explaining in such easy way and you have given a very good example which make us to understand easily amd better way.

  • @digitalnomadg
    @digitalnomadg6 жыл бұрын

    Such an enjoyable video. Thank you sir :)

  • @vrchic4411
    @vrchic44115 жыл бұрын

    Such a good explanation ! Thanks!

  • @AkashKumar-zo6uf
    @AkashKumar-zo6uf5 жыл бұрын

    Thank you, Sir. You really made it simple to understand :)

  • @ashuzguitar
    @ashuzguitar4 жыл бұрын

    Thank you so much Naveen Reddy ! I've some experience, and even I found this very useful. So far, I've used @Autowire n number of times to inject @Repositories in my @Services and to inject @Services in my @Controllers. But after watching your video, it became crystal clear, why!! The example of Hitachi and Samsung Harddrives implementing Harddrive interface and Laptop using loose coupling by means of someone else injecting the dependencies - @Autowire and @Component - is a truly great example, and it has helped me grasp this concept, I'd like to believe, concretely. Earlier I knew how to use it, but wouldn't be able to explain so lucidly to some one if they asked WHY. I'd just say do like this, as it is industry standard :D :) Similarly, I knew about JUnit testing with Mockito and mocking certain classes, etc. But didn't consciously realize that due to loose coupling only mocking is made possible. I never worried about how mocking is made possible. Now I know. :) \/, So, thanks a lot. May god bless you ! You now have a new subscriber.

  • @Anju02
    @Anju023 жыл бұрын

    You just explained the concept nicely manner. Thanks for explaining! finally got it.

  • @KotaSarat52
    @KotaSarat526 жыл бұрын

    The knowledge u share to us is priceless

  • @vaibhavbhavsar1
    @vaibhavbhavsar14 жыл бұрын

    Quite Impressssive , i understand everything in just 8 min thanks

  • @lifeind4293
    @lifeind42933 жыл бұрын

    Simplest and best explanation of DI. Thank you!!

  • @YouradOmrik
    @YouradOmrik2 жыл бұрын

    Things are easy to understand but difficult to explain, thank you so much Sensei.

  • @rissandimo
    @rissandimo5 жыл бұрын

    This is an excellent video, thanks for taking the time to make it! And for the people commenting that he needs to provide some sort of implementation, he posted a link to that in the description: @t

  • @nirajkishore8787
    @nirajkishore87875 жыл бұрын

    Very nice videos. The way you have taught spring mvc was awewsome. May I request you please upload the spring boot videos like that ie with creating a basic program.

  • @archu0078
    @archu00785 жыл бұрын

    You have got very good teacher skill. Awesome 👏 . Very clear and concise

  • @88ashwa
    @88ashwa5 жыл бұрын

    You are a great teacher Naveen garu, than you for the video series..

  • @sidharthanayak
    @sidharthanayak4 жыл бұрын

    Very thorough, simple and informartive explanation!

  • @sachinchinnannavar9514
    @sachinchinnannavar95146 жыл бұрын

    Marvelous sir ,I was in need of this concept and you made it very clear thankyou ..please make a video on AOP

  • @AlayDhagia
    @AlayDhagia2 жыл бұрын

    Learned a lot. Thank you for putting this up.

  • @ramnivasmurugesan6453
    @ramnivasmurugesan64535 жыл бұрын

    love you man.. awesome explanation..

  • @saikrishnaT
    @saikrishnaT5 жыл бұрын

    Sir, i want to learn Spring, which playlist is suitable for me to learn from scratch? Spring Boot or Spring MVC or any other playlist??

  • @nitinjain2490
    @nitinjain24903 жыл бұрын

    Clarity of DI is 🔥 by far the best video ❤️

  • @elizabethakpan979
    @elizabethakpan9795 жыл бұрын

    This is a really great explanation.

  • @jarhrodriguez646
    @jarhrodriguez6464 жыл бұрын

    Extremely grateful for this explanation sir!

  • @IamShGulati
    @IamShGulati6 жыл бұрын

    Awesome. So clear and simple.

  • @markgoldstein
    @markgoldstein4 жыл бұрын

    Great explanation, thank you

  • @zestjaiarun
    @zestjaiarun5 жыл бұрын

    Awesome! Well done on this tutorial.

  • @arungore6578
    @arungore65785 жыл бұрын

    You have improved lot in the area of content delivery.. keep going on

  • @roshanpandey5357
    @roshanpandey53573 жыл бұрын

    Yeah, now I understand .. what is dependency injection, why it is required, how it works ... this man is too good #telusko

  • @jeniljain6928
    @jeniljain69284 жыл бұрын

    Great explanation!! Really recommended. Thank you :D

  • @birdsonwheels4810
    @birdsonwheels48105 жыл бұрын

    such a simple explanation..it was awesome Sir

  • @jameswagstaff1962
    @jameswagstaff19625 жыл бұрын

    Fantastic explanation! Thanks! Could anybody help with the difference between Dependency Inversion and dependency injection??

  • @wodiarefaine5076
    @wodiarefaine50764 ай бұрын

    I thoroughly enjoy the way you explain things; you are undoubtedly talented at it. Personally, I highly value and appreciate the service you provide.

  • @cm9989
    @cm99895 жыл бұрын

    Such an wonderful lecture!!!!!!

  • @SyedAli-tc3yu
    @SyedAli-tc3yu4 жыл бұрын

    I actually enjoyed this.Man O man you are a gem

  • @praveentripathi1621
    @praveentripathi16216 жыл бұрын

    its a great explaination od Dependency Injection sir

  • @meetalodariya5972
    @meetalodariya59724 жыл бұрын

    the best explanation I found on the internet................

  • @shraddhabaeet3793
    @shraddhabaeet37934 жыл бұрын

    No words.... only will say "CLASSY "!!!!

  • @tyrannicrex7114
    @tyrannicrex71145 жыл бұрын

    very intuitive , thanks!

  • @tusharrohilla7862
    @tusharrohilla78623 жыл бұрын

    Wow, now that's a brilliant explanation 💯💯

  • @doomygloomy1
    @doomygloomy15 жыл бұрын

    This was a beautiful way to explain it

  • @kayeshparvez
    @kayeshparvez5 жыл бұрын

    Great Tutorial. Very helpful

  • @shanchessmetilda5550
    @shanchessmetilda5550 Жыл бұрын

    Hey ! You have it so simple.Thanks for this :)

  • @scienceblossom6197
    @scienceblossom61976 жыл бұрын

    Damn!!! I have some feelings that KZread sends you my search activities, I've been just searching this since yesterday and you uploaded this now :| Thanks a lot anyway :D I love how easy and simple you try to explain everything, specially the last part(testing) made the most sense for me as a beginner.

  • @vitalnutrients744

    @vitalnutrients744

    5 жыл бұрын

    Yes he's really helpful

  • @BK-nb9or
    @BK-nb9or2 жыл бұрын

    Very useful and good explanation! Thank you!

  • @madanram70
    @madanram704 жыл бұрын

    Explained very well.. I like your teaching

  • @gayathrik8214
    @gayathrik82145 жыл бұрын

    Very Very clean explantion.. clean as in understandable tq

  • @hrishikesh1593
    @hrishikesh15935 жыл бұрын

    Great video, answers what and why of DI ...

  • @himanshiraikwar8053
    @himanshiraikwar80535 жыл бұрын

    excellent explanation!

  • @behzadmokhnefi1636
    @behzadmokhnefi16364 жыл бұрын

    The best teacher that i have ever seen , thanks a lot !!!!!!!

  • @rajeshanneboina4729
    @rajeshanneboina47295 жыл бұрын

    Hi Naveen, if it's the class SamsungHD implemented by HardDrive then which class will inject ? By the way you are already implemented HardDrive in HitachiHD class..

  • @nafseeram927
    @nafseeram9276 жыл бұрын

    Sir plz continue spring classes

  • @ruchikachandra5636
    @ruchikachandra56362 жыл бұрын

    Really good explanation. Your example is very understandable.

  • @SA-oh9bk
    @SA-oh9bk2 жыл бұрын

    Thanks for the real concept of dependency injection.

  • @7988honey
    @7988honey2 жыл бұрын

    Great I knew we use this for loosely coupled but the way he told is very good.

  • @ruvindaranasinghe780
    @ruvindaranasinghe7805 жыл бұрын

    One of the better Java channels :)

  • @quocnguyen2854
    @quocnguyen28545 жыл бұрын

    Great explanation!

  • @bijoybikashsahu3406
    @bijoybikashsahu34065 жыл бұрын

    Good explanation,thank you

  • @ananddhapse408
    @ananddhapse4083 жыл бұрын

    Awesome explanation Really i enjoyed your teaching...👌👌

  • @ravikyasth6851
    @ravikyasth68513 жыл бұрын

    Thank you so much Naveen Reddy !

  • @ASIFJUNEJA
    @ASIFJUNEJA4 жыл бұрын

    Made My Day ♥

  • @lakhanjmas77
    @lakhanjmas775 жыл бұрын

    Nicely Explained!!

  • @eliasfonguhnji4898
    @eliasfonguhnji48983 ай бұрын

    This time I got your explanation for DI very very clear

  • @kidscodezone2573
    @kidscodezone25735 жыл бұрын

    Great Explanation

  • @shankarsalesforceseries5196
    @shankarsalesforceseries51965 жыл бұрын

    Super, bro. Thank you.

  • @praveennarvaneni2970
    @praveennarvaneni2970 Жыл бұрын

    The example is awesome. Thank you

  • @nikhilmoolwani9323
    @nikhilmoolwani93233 жыл бұрын

    Wow man! Loved the way you explained :D

Келесі