Please can you make tutorials on DevOps, springboot BDD Testing, and more advanced topics and concepts, also how to do desktop app development with java
Just a mention for the viewers: at @17:50 a class cannot be annotated with @Bean since its scope is limited to methods. Usually we use @Bean annotation on methods in a class annotated with @Configuration when we use external dependencies to generate beans for them. On the other hand, in order to mark a class as a bean we use the @Component annotation, which is a stereotype annotation (like @Service, @Repository and @Controller).
Now everything make sense!!! That's why people create an Interface for every class; that's why people assign every field inside the constructor. The Interfaces are created to decouple the "true" class, being able to pass other objects with the same signature, LIKE A MOCK CLASS.
@erickjhormanromero6905 yes he did, indirectly he did when he said that with singleton a connection class was instantiated just once, correct me if I m wrong.
Just to be clear, he did not describe DI at all. Instead, he described passing arguments to a constructor. What this video makes clear is that AmigosCode actually has no idea what dependency injection is, and ill-informed content like this only leads to more confusion. Trust me, calling a parameterized constructor is not DI by any stretch of the imagination.
Amazing! best injection tutorial I saw until this point . The issue with injection is that is so simple it is hard to understand, it is something that comes naturally.
Unfortunately, what he describes as DI is simply passing a parameter to a constructor. That is not DI by any stretch of the imagination, and it makes it clear that the presenter doesn't actually know what dependency injection is.
For those who wanna learn about Beans with details, I recommend the Spring Start Here book from Laur Spilca, it's an introductory book about Spring where the author use some analogies to explain about beans, it's quite interesting.
I think that your explanation of dependency incjection in pure java is quite good. On the other hans I think you should say something about pross and cons of context dependency injection. There is some problems with it and it should not be used as remedy for everything. For example in huge applications when you have thousands of services etc. it may become bean hell where dependency tree will looks like spaghetti cause of beans flying everywhere. Another drawback is that if you make your class a singleton bean and this class (for example service) is used only from time to time it still wastes memory. Garbage collector can't collect it even if you stoped to use this class way ago. So people of java don't be afraid to instantiate objects with new () keyword! :D Sorry for mistakes, English language is not my native language ;)
Thanks, dude, for explaining to us that it's not the world saver and it could not be the best approach to take in all cases. Thanks, and about your English it's fine, it's not also my native language.
Thanks bro again you nailed it, I've read a lot of books about the dependencies injections but I couldn't find what I was looking for, lastly I can get my head around it in this video. my ALLAH bless you
RUclips insists on showing me Java code... as a JavaScript developer - but big fan of dependency injection in general. Works in a functional context as well (i.e. split stuff in more functions, pass stuff needed as params rather than make "scope" do all the lifting) - then test the functions directly.
Assalamwalaikum. Thank you for the video. May Allah bless you with all of His blessings. You are a great teacher and just learning from you is just so easy than from other resources 😊❤
Awesome video, thank you very much! Looking forward to the DI videos. I hope you give us a glimpse of manually doing singleton DI just to show us how it is done, in case one does not use Spring or something else.
I don't know why you need this if Spring is one of the most used java framework and will do all for you. but check this. To achive that is just to check if there's already a instance on such dependecny to be injected in the constractor of the target class and return the same instance. ruclips.net/video/tSZn4wkBIu8/видео.html
I had a doubt. In your Spring boot tutorials, @Autowired is not used. The class is annotated with @RequiredArgsConstructor and the dependency attributes are declared as final. In this video, I understood that @Autowired is used to inject the dependency instance that was found. Why is @Autowired not used in the construction of your Spring projects? Thank you for everything, I'm a big fan of yours!!
So dependency injection is what's being used in MVP is it at Presenter to be specific? I am currently familiarizing my self to the patterns, and so far, i think patterns are awesome.
Is this part of a course playlist, because I can't find the other videos he refers to when saying "earlier we talked about" or "we'll cover this later on". I genuinely liked the explanations and so was wondering where I can find the full playlist?
Thanks for the tutorial Brother. Thanks for sharing . Your english so easy to understand. How do you record your video? Do you use some special device ? I liked your Java series .
Hi @Amigoscode, You have beautifully explained the DI. I have one question here. I am using DI using and have a situation like below public class Demo { private CarDAO carDao; private NewCar newCar; public Demo (CarDAO carDao){ this.carDao = carDao; newCar = new NewCar(this.carDao); } Can you please guide how to handle this situation ... without instantiating the newCar in the constructor..
is the boot-Camp free or? and also is it online? ....and if possible can @Amigoscode make a separate video explaining in a bit of depth how the boot-Camp will carry out, because i have a lot of questions about i have i am very much interested in joining
Where is the previous video before this? you say: "earlier in this course we..." is that video available on RUclips? Or do we need to pay? And if so, where?
Aren't you defeating the purpose of dependency injection by implementing with concrete implementations instead of interfaces, you still have a tightly coupled dependency? I haven't used @Bean so maybe this solves the problem.
Good video. When you learn clean architecture you'll realise you should not inject an infrastructure instance (DAO) into your domain (service). Create a CarRepository interface in you domain layer and implement it in your infrastructure layer. Your DAO instance(s) are injected into a CarRepositoryJpa (for example) implementation. The domain (business) layer then stays clean. The domain only ever uses the CarRepository interface.
i think you have a misundestanding about domain and bussines. Domain is the entity that you need to make some operaration and service (Bussiness) is where you add all the logic of your bussiness and use CarRepositoryJpa and domain as well. You don't need to use DAO today for that reason you have JPA. we usually did that when we worked with SQL queries and even wanting use DAO we have JPA to perform SQL queries (they called JPQL queries ).
@@erickjhormanromero6905 , I understood the comment such that the term "domain" is used like in DDD (domain-driven design) as opposed to something DI/IoC specific.
19:30 Do we really need to put either @Autowired or @Inject at the constructor? I thought spring sees the constructor argument and automatically injects the dependency
Thank you bro for all the content you bring toi us realy so helpful. I want just to Ask you to do more vidéo on java even the easiest Java topics it will be very for everyone. For exemple Can you make a vidéo about exceptions how jvm please bro!
It's an awesome video, I just still have a small question, can you explain a little bit more what the purpose of the annotation @Autowire is. That's the only thing I'm still kinda confused about. Thank you in advance.
great video. This video belongs to a playlist? in that case, what is the link of that list where you can find, for example, the video in which you talk about the annotations like the @Bean
I'm currently studying for a backend position and I need to learn dependency injection on python, currently trying to implement it on my own linked list with its own node class, could anyone provide an example or explain more or less how could I actually implement dependency injection?
umm, bruh, isn't what you're doing just DIP? I thought Depency injection requires a plugin to dinamically inject dependencies into our classes. it looks like you're doing it manually tho.
Register your interested for Amigoscode bootcamp here: amigoscode.hopp.to/bootcamp-register-interest
Can you please do a video on how to create a java resume or portfolio. Especially for a backed developer?
Please can you make tutorials on DevOps, springboot BDD Testing, and more advanced topics and concepts, also how to do desktop app development with java
Thanks for the video. Loved the Intellij theme you have. Which one is it?
Salam Amigos
Walikomasalam,
Thank you for not using the music brother. May Allah be please with you. ❤
Just a mention for the viewers: at @17:50 a class cannot be annotated with @Bean since its scope is limited to methods. Usually we use @Bean annotation on methods in a class annotated with @Configuration when we use external dependencies to generate beans for them. On the other hand, in order to mark a class as a bean we use the @Component annotation, which is a stereotype annotation (like @Service, @Repository and @Controller).
Good to had done this clarification may be a newbie in programming could have been a little confused
@@erickjhormanromero6905 yeah....like me 😁...new in Spring
Thanks for the info. I'm actually one of these newbies. I use quarkus but I'm still learning how things work under the hood.
Now everything make sense!!! That's why people create an Interface for every class; that's why people assign every field inside the constructor.
The Interfaces are created to decouple the "true" class, being able to pass other objects with the same signature, LIKE A MOCK CLASS.
The best explanation of the dependency injection and the singleton pattern! Simple and to the point!
He never explaind singleton design patten just mentioned it. 😃😃
Helpline📲📥⬆️
Questions can come in⬆️
@erickjhormanromero6905 yes he did, indirectly he did when he said that with singleton a connection class was instantiated just once, correct me if I m wrong.
Just to be clear, he did not describe DI at all. Instead, he described passing arguments to a constructor. What this video makes clear is that AmigosCode actually has no idea what dependency injection is, and ill-informed content like this only leads to more confusion. Trust me, calling a parameterized constructor is not DI by any stretch of the imagination.
Amazing! best injection tutorial I saw until this point . The issue with injection is that is so simple it is hard to understand, it is something that comes naturally.
Unfortunately, what he describes as DI is simply passing a parameter to a constructor. That is not DI by any stretch of the imagination, and it makes it clear that the presenter doesn't actually know what dependency injection is.
I'm an android developer and I needed to understand dependency injection, I think this video has given me an idea of when dependency inject is about.
For those who wanna learn about Beans with details, I recommend the Spring Start Here book from Laur Spilca, it's an introductory book about Spring where the author use some analogies to explain about beans, it's quite interesting.
Do you have it in digital format?
@@alexisdonasearch it on Reddit, I found it there!
I think that your explanation of dependency incjection in pure java is quite good. On the other hans I think you should say something about pross and cons of context dependency injection. There is some problems with it and it should not be used as remedy for everything. For example in huge applications when you have thousands of services etc. it may become bean hell where dependency tree will looks like spaghetti cause of beans flying everywhere. Another drawback is that if you make your class a singleton bean and this class (for example service) is used only from time to time it still wastes memory. Garbage collector can't collect it even if you stoped to use this class way ago. So people of java don't be afraid to instantiate objects with new () keyword! :D
Sorry for mistakes, English language is not my native language ;)
perfect.. people is very naive when coding with this patterns. And call the new operator of "bad code" is funny.
Great comment
Thanks, dude, for explaining to us that it's not the world saver and it could not be the best approach to take in all cases. Thanks, and about your English it's fine, it's not also my native language.
Just in time! I am writing my MSc thesis and this information is valuable!
dependency injection is a bachelor 2. semester concept man 😶
@@mad616No it’s not lol
Thanks bro again you nailed it, I've read a lot of books about the dependencies injections but I couldn't find what I was looking for, lastly I can get my head around it in this video. my ALLAH bless you
Just small thing, at 15:55, if HEAP is full, you will get OutOfMemoryError, and not StackOverflowError.
You're amazing! Saying hi from the Philippines.
I always love your tutorial. You make everything clear and simple.
absolute amazing SOLID tutorial!
RUclips insists on showing me Java code... as a JavaScript developer - but big fan of dependency injection in general. Works in a functional context as well (i.e. split stuff in more functions, pass stuff needed as params rather than make "scope" do all the lifting) - then test the functions directly.
MashaAllah brother. You are talented. I'm learning from your videos. And I am adapting it to Dart language.
Assalamwalaikum. Thank you for the video. May Allah bless you with all of His blessings. You are a great teacher and just learning from you is just so easy than from other resources 😊❤
Amazing explanation, Congrats from Brazil !!!!
Very interesting and easy explanation! Thank you so much!
This is really excellent tutorial on dependency injection ..... thanks
Thank you so much! Fantastic explanation! 💛
Awesome video, thank you very much!
Looking forward to the DI videos. I hope you give us a glimpse of manually doing singleton DI just to show us how it is done, in case one does not use Spring or something else.
I don't know why you need this if Spring is one of the most used java framework and will do all for you. but check this.
To achive that is just to check if there's already a instance on such dependecny to be injected in the constractor of the target class and return the same instance. ruclips.net/video/tSZn4wkBIu8/видео.html
I've been stuck to this for days, thank you!
Can't wait for the course to come out!
I had a doubt. In your Spring boot tutorials, @Autowired is not used. The class is annotated with @RequiredArgsConstructor and the dependency attributes are declared as final. In this video, I understood that @Autowired is used to inject the dependency instance that was found. Why is @Autowired not used in the construction of your Spring projects? Thank you for everything, I'm a big fan of yours!!
It was easy to understand this idea with your explanation, thx
So dependency injection is what's being used in MVP is it at Presenter to be specific? I am currently familiarizing my self to the patterns, and so far, i think patterns are awesome.
Excellent explanation.
Is this part of a course playlist, because I can't find the other videos he refers to when saying "earlier we talked about" or "we'll cover this later on".
I genuinely liked the explanations and so was wondering where I can find the full playlist?
The DI concept is confusing me for a while util i see this clip. Really good work Bro.
Wow, it's super helpful!
Great explanation thank you
Awesome explanation of DI
great video! cyclic dependency is a great topic for a future video.
Good one actually
Hi from Ukraine!
@@evgeniy_lukas Слава Україні
Keep going.
Great, Baraka allahou fik.
Wow, the best video for beginners. Thanks sir for your video, so sweet explants about the proccessing.
Jazakallah brother
Great explanation 👌
Haji 😊
Thank you! You explained it very clearly
Thank you so much sir. ❤️
May Allah reward you for those explanations.
Great thanks so much bro
Subscribed! thank you sir!
is there a video after this to recommend to understand the rest of annotations in spring framework?
Thanks for the tutorial Brother. Thanks for sharing . Your english so easy to understand. How do you record your video? Do you use some special device ? I liked your Java series .
Hi @Amigoscode,
You have beautifully explained the DI. I have one question here. I am using DI using and have a situation like below
public class Demo {
private CarDAO carDao;
private NewCar newCar;
public Demo (CarDAO carDao){
this.carDao = carDao;
newCar = new NewCar(this.carDao);
}
Can you please guide how to handle this situation ... without instantiating the newCar in the constructor..
is the boot-Camp free or? and also is it online? ....and if possible can @Amigoscode make a separate video explaining in a bit of depth how the boot-Camp will carry out, because i have a lot of questions about i have i am very much interested in joining
Salam alikum Amigo ,
What should I now to be ready to start with Spring ?
Pleas let me now 🤗
Wa'alaykumsalam my brother
Where is the previous video before this? you say: "earlier in this course we..." is that video available on RUclips? Or do we need to pay? And if so, where?
HI! PLease which app are you using to make this schema? Thanks
its a good programing coure?
sorry for bad englisch
Aren't you defeating the purpose of dependency injection by implementing with concrete implementations instead of interfaces, you still have a tightly coupled dependency? I haven't used @Bean so maybe this solves the problem.
What’s that lighting setup?
The video is crispy.
Good video. When you learn clean architecture you'll realise you should not inject an infrastructure instance (DAO) into your domain (service). Create a CarRepository interface in you domain layer and implement it in your infrastructure layer. Your DAO instance(s) are injected into a CarRepositoryJpa (for example) implementation. The domain (business) layer then stays clean. The domain only ever uses the CarRepository interface.
i think you have a misundestanding about domain and bussines.
Domain is the entity that you need to make some operaration and service (Bussiness) is where you add all the logic of your bussiness and use CarRepositoryJpa and domain as well.
You don't need to use DAO today for that reason you have JPA. we usually did that when we worked with SQL queries and even wanting use DAO we have JPA to perform SQL queries (they called JPQL queries ).
@@erickjhormanromero6905 , I understood the comment such that the term "domain" is used like in DDD (domain-driven design) as opposed to something DI/IoC specific.
Essalamo Aleykum bro is there any book that you can advise us with to get a deep understanding for the dependencies injection?
Bro I love your Videos, where you learned this all?
Assalamu alaikum brother. Your videos are too good.
Will the bootcamp be available free of cost ?
what's the previous video of this course?
do u have a vid about testing in spring?
If Spring boot was never invented I would never have continued and loved java.
Díky!
NestJS does the same thing! Good tutorial thanks!
Angular too. remember nest is for Node
great video. keep it going brother.
Hope you explain more about OOP. Thanks
Qual o tema e a fonte que você está usando? Ótimo conteúdo
19:30 Do we really need to put either @Autowired or @Inject at the constructor? I thought spring sees the constructor argument and automatically injects the dependency
yupp put autowired annotation so it can be automatically injected
Thank You brother
Thank you bro for all the content you bring toi us realy so helpful. I want just to Ask you to do more vidéo on java even the easiest Java topics it will be very for everyone. For exemple Can you make a vidéo about exceptions how jvm please bro!
Then why do we use @Autowired annotation? How is it different from this scenario?
9:16 if Carservice has 10 fileds, it must be 10 parameters in condtructor?
Can you do a video on programminng to interfaces in Java?
keep up my friend always check new videos
Thank you!
great video !!
Based video - as always!
Thanks for this video nelson✌. Can you cosider doing a video on payment integration in spring boot?
It's an awesome video, I just still have a small question, can you explain a little bit more what the purpose of the annotation @Autowire is. That's the only thing I'm still kinda confused about. Thank you in advance.
Could not get how DI makes testable and loosely coupled code?
Bro I was just searching for a good video on this topic😂
thank you for great tips and concept topics like this. Asselamu aleikum
Helpline📲📥⬆️
Questions can come in⬆️.
Usssalaam vaaleykum 👍👌
great video. This video belongs to a playlist? in that case, what is the link of that list where you can find, for example, the video in which you talk about the annotations like the @Bean
Waalekum assalam...
Perfection.
Liked immediately
Waalaikum Salam brother
I'm currently studying for a backend position and I need to learn dependency injection on python, currently trying to implement it on my own linked list with its own node class, could anyone provide an example or explain more or less how could I actually implement dependency injection?
No need for @Autowired for the constructor because Spring is smart enough to do it for us except cases with multiple constructors.
Awesome
Is there a play list?
What's with emo service?
Great!❤️
Greetings amigos code, because I do not receive any information from the bootcamp to my email I have already registered
وعليكم السلام ورحمة الله, الحمد لله.
Make video on micro services
Its already there
Ty
umm, bruh, isn't what you're doing just DIP? I thought Depency injection requires a plugin to dinamically inject dependencies into our classes. it looks like you're doing it manually tho.