Комментарии:
This was a great watch. Good job!
ОтветитьWhy did MailChimpEmailService Class get annotated with @Service but earlier EmailService Class didn't. Both were injected with ContactListService?
ОтветитьJazaakallah brother
ОтветитьIn general i like that you make a video about this topic. But in detail i am missing some background. You say, it is complicated and a lot code to talk about.
But at least some core mechanics and ideas behind it, would be great to know.
I don't know how spring does its dependency injection, but i know from other framworks they did it more simple and easy.
There you can downsize it to a class register, which registrates all singleton classes and construct these at start.
This register is also able to get additional data from configuration files. Thats the basic idea behind it.
Of course how and what exactly different frameworks do differently can be quite a lot. But i think the idea behind it, is just a mechanism how to ensure, that these classes have always only one instance.
The Service Annotation helps the register to know, that this class needs to be part of the service registry. In some frameworks, you have to put your class in a service config file and do it manually, instead of an annotation.
Great intro, thank you!
ОтветитьYou are a great teacher
ОтветитьQuestion: Does this thing actually make sense only when using Spring and alike frameworks ?
ОтветитьExcellent explanation. Clear and simple. Thanks!
ОтветитьWhy is it necessary to tag the method and the field and the dependency class if you are passing the value to the constructor already? Seems like the functions of the tags is to implement the singleton pattern and manage the lifecyle of the instance but the injecting is happening in the constructor, you didn't show how to instantiate the mailChimpEmailService what are we passing to it's construcror?
Ответитьvery insightful, not what I'm looking for in syntax but the explanation is all that I need
ОтветитьReally well explained! Thank you!
ОтветитьThanks! you explain how and what does this injection is doing so clearly! Subscribed!
ОтветитьDependency Injection is global variables on steroids
Ответитьso what is the difference between Injection and Autowire?
ОтветитьMy English is bad. Can anyone explain to me why the title is Dependency Injection Explained instead of Explained Dependency Injection? Thank in advance
ОтветитьThis explanation is awesome. Thank you!
Ответитьma sha Allah! 👍👏
ОтветитьDependency injection is basically creating an object that, if its a service (aka usually only performs methods with static variables that dont change), then use that same object over and over again rather than creating new ones
ОтветитьVery helpful!
ОтветитьCan you please cover a special video on Junits and Mockito?
ОтветитьGreat explanation good job
ОтветитьWhat if you wouldn't use @Inject? I have already used objects like this without writing @Inject on Spring boot but has worked for me.
ОтветитьDo you recommend learning Guice? Do you Guice tutorials?
Ответитьamazing
ОтветитьDependency injection is mostly for changing environments. E.g. Development vs. production. The code will not have to be altered, and the resources will come from different services such as a database and if you are working in dev, you'll get the PostgreSQL service, and if your working in production you'll get the Oracle service.
ОтветитьYou explained this really well. Thank you.
ОтветитьBest explanation I heard about the dependency injection. Bravo!
ОтветитьSubtitles come up with “penis’ injection” and I was wondering what I clicked on
ОтветитьCould you make a video about dependency inversion? please 🙏
Ответитьso your explanation is it's bad for mockito testing, garbage
Ответитьthank you !
ОтветитьHow do we specify the different lifetime scopes for our DI objects .
ОтветитьGenial curso ahora lo entiendo todo
Ответитьlong and similar class names make difficult to chase video. It could have been more simple explanation
ОтветитьI am learning Java now after Javascript. The video is super helpful. Thank you!
ОтветитьBrilliant explanation! Well done
ОтветитьWhy did you write @Service for MailChimpEmailService but not for EmailService?
ОтветитьNelson you’re awesome 👏🏻 you explain everything miraculously. Thanks 🙏🏻
ОтветитьWhats the difference between this and Singleton again
ОтветитьI love you
ОтветитьWhich ide and plugins?
ОтветитьCould you make one on Guice?
ОтветитьVery well explained !! Thank you
ОтветитьThank you indid
ОтветитьAmazing. Thanks.
ОтветитьBest Explanation sir
ОтветитьI speak Spanish, sorry if I have spelling mistakes.
I'm not sure but,I had understood.
i had understand instantiate a class with keyword new , this sentence what you do is use address in memory in memory stack and not heap.
Imagine you want to test your app with fakeapiservicegenerator where you implement an interface contract of 3 function like get user list ,remove an user, and generate a random user (from a fake random user list of let s say 4 e mail) to add that random e mail to the main list like you want to fill it with more user e-mail.
How can I create a new variable (lets say userRandom) and add it to the user list?