Learn Dependency Injection and Write Better Code

  Рет қаралды 178,784

Amigoscode

Amigoscode

Күн бұрын

Пікірлер: 154
@amigoscode
@amigoscode 2 жыл бұрын
Register your interested for Amigoscode bootcamp here: amigoscode.hopp.to/bootcamp-register-interest
@samuelflower226
@samuelflower226 2 жыл бұрын
Can you please do a video on how to create a java resume or portfolio. Especially for a backed developer?
@michelchaghoury9629
@michelchaghoury9629 2 жыл бұрын
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
@JanardanMaithil
@JanardanMaithil 2 жыл бұрын
Thanks for the video. Loved the Intellij theme you have. Which one is it?
@Aljadeedstudio
@Aljadeedstudio 2 жыл бұрын
Salam Amigos
@contentparrot
@contentparrot 2 жыл бұрын
Walikomasalam, Thank you for not using the music brother. May Allah be please with you. ❤
@terrah33
@terrah33 2 жыл бұрын
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).
@erickjhormanromero6905
@erickjhormanromero6905 2 жыл бұрын
Good to had done this clarification may be a newbie in programming could have been a little confused
@mayureshghodke7183
@mayureshghodke7183 Жыл бұрын
@@erickjhormanromero6905 yeah....like me 😁...new in Spring
@victorbucci5760
@victorbucci5760 11 ай бұрын
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.
@johnnya246
@johnnya246 2 жыл бұрын
The best explanation of the dependency injection and the singleton pattern! Simple and to the point!
@erickjhormanromero6905
@erickjhormanromero6905 2 жыл бұрын
He never explaind singleton design patten just mentioned it. 😃😃
@user-rl5pb5un2f
@user-rl5pb5un2f 2 жыл бұрын
Helpline📲📥⬆️ Questions can come in⬆️
@SoniaChavez-je7hq
@SoniaChavez-je7hq 10 ай бұрын
@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.
@cameronmcnz
@cameronmcnz 4 ай бұрын
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.
@grzegorzmolin
@grzegorzmolin Жыл бұрын
Díky!
@Secretclaps
@Secretclaps Жыл бұрын
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.
@cameronmcnz
@cameronmcnz 4 ай бұрын
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.
@Diego-Garcia
@Diego-Garcia Жыл бұрын
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.
@bartex10101
@bartex10101 2 жыл бұрын
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 ;)
@rafaelrosa3841
@rafaelrosa3841 2 жыл бұрын
perfect.. people is very naive when coding with this patterns. And call the new operator of "bad code" is funny.
@henriquesenadev2194
@henriquesenadev2194 2 жыл бұрын
Great comment
@eufraniodiogo50
@eufraniodiogo50 2 жыл бұрын
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.
@_freeworld
@_freeworld 8 ай бұрын
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.
@andrekreou1
@andrekreou1 2 жыл бұрын
Just in time! I am writing my MSc thesis and this information is valuable!
@mad616
@mad616 Жыл бұрын
dependency injection is a bachelor 2. semester concept man 😶
@andiuptown1711
@andiuptown1711 9 ай бұрын
@@mad616No it’s not lol
@jaymarkalvarez9851
@jaymarkalvarez9851 2 жыл бұрын
You're amazing! Saying hi from the Philippines.
@paulo__vieira
@paulo__vieira 2 жыл бұрын
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.
@alexisdona
@alexisdona 10 ай бұрын
Do you have it in digital format?
@andiuptown1711
@andiuptown1711 9 ай бұрын
@@alexisdonasearch it on Reddit, I found it there!
@nguyenminh1402
@nguyenminh1402 7 ай бұрын
I always love your tutorial. You make everything clear and simple.
@ahmedbishree9429
@ahmedbishree9429 2 жыл бұрын
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
@michailmarkou1995
@michailmarkou1995 2 жыл бұрын
absolute amazing SOLID tutorial!
@cameronmcnz
@cameronmcnz 4 ай бұрын
Just for the record, your understanding of dependency injection is completely off base, and I'd go so far as to say posting incorrect information like this is irresponsible. At 10:10 you suggest that passing an argument to a constructor is dependency injection. That shows a complete and total misunderstanding of DI. We were passing values to parameterized constructors decades before the term DI was coined. That's not DI, that's just a basic programming concept. I mean, does anyone actually think signers of the Agile Manifesto invented the term DI just to describe the idea of passing an argument to a method?🤦‍♂
@Griefed_
@Griefed_ 2 жыл бұрын
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.
@erickjhormanromero6905
@erickjhormanromero6905 2 жыл бұрын
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. kzbin.info/www/bejne/qoS9n2etoKd8q5o
@haihoangninh3237
@haihoangninh3237 2 жыл бұрын
I've been stuck to this for days, thank you!
@kostiantynkarzhanov9216
@kostiantynkarzhanov9216 11 ай бұрын
Thank you so much! Fantastic explanation! 💛
@thEstRonG3r
@thEstRonG3r 2 жыл бұрын
Just small thing, at 15:55, if HEAP is full, you will get OutOfMemoryError, and not StackOverflowError.
@franke1917
@franke1917 9 ай бұрын
Very interesting and easy explanation! Thank you so much!
@RicardoSilvaTripcall
@RicardoSilvaTripcall 2 жыл бұрын
Amazing explanation, Congrats from Brazil !!!!
@SiyaNtombela
@SiyaNtombela 2 жыл бұрын
Can't wait for the course to come out!
@ahmaddawood9691
@ahmaddawood9691 2 жыл бұрын
This is really excellent tutorial on dependency injection ..... thanks
@SoniaChavez-je7hq
@SoniaChavez-je7hq 10 ай бұрын
It was easy to understand this idea with your explanation, thx
@bstaysglamorous
@bstaysglamorous Жыл бұрын
Great explanation thank you
@marzenalaaeddine
@marzenalaaeddine 2 жыл бұрын
Great, Baraka allahou fik.
@kunnudev7250
@kunnudev7250 2 жыл бұрын
Great thanks so much bro
@89Valkyrie
@89Valkyrie 2 жыл бұрын
Excellent explanation.
@kvojps-yt
@kvojps-yt Жыл бұрын
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!!
@nestoralmarza5732
@nestoralmarza5732 2 жыл бұрын
great video! cyclic dependency is a great topic for a future video.
@amigoscode
@amigoscode 2 жыл бұрын
Good one actually
@teachermartin8251
@teachermartin8251 2 жыл бұрын
Awesome explanation of DI
@vyylight
@vyylight 2 жыл бұрын
Thank you so much sir. ❤️
@SerdarPolat21
@SerdarPolat21 2 жыл бұрын
MashaAllah brother. You are talented. I'm learning from your videos. And I am adapting it to Dart language.
@kuchdarith
@kuchdarith 2 жыл бұрын
Wow, the best video for beginners. Thanks sir for your video, so sweet explants about the proccessing.
@Dzikrullah_999
@Dzikrullah_999 Жыл бұрын
Jazakallah brother
@pstlvictoras
@pstlvictoras 2 жыл бұрын
Subscribed! thank you sir!
@jeff_tech
@jeff_tech 2 жыл бұрын
Thank you! You explained it very clearly
@mohsenzahabipour40
@mohsenzahabipour40 2 жыл бұрын
Great explanation 👌 Haji 😊
@kopilkaiser8991
@kopilkaiser8991 Жыл бұрын
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 😊❤
@IzabelaLuka
@IzabelaLuka Жыл бұрын
Wow, it's super helpful!
@xeyalteyyubov1175
@xeyalteyyubov1175 Жыл бұрын
Keep going.
@JulianSloman
@JulianSloman Жыл бұрын
KZbin 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.
@johncarlo4028
@johncarlo4028 2 жыл бұрын
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.
@deltamakuba
@deltamakuba 2 жыл бұрын
Thank You brother
@KailashJNirmal
@KailashJNirmal 2 жыл бұрын
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 .
@evgeniy_lukas
@evgeniy_lukas 2 жыл бұрын
Hi from Ukraine!
@АндрійЧерненко-б6ф
@АндрійЧерненко-б6ф 6 ай бұрын
@@evgeniy_lukas Слава Україні
@bahmad2009
@bahmad2009 2 жыл бұрын
Usssalaam vaaleykum 👍👌
@optimisticenigma283
@optimisticenigma283 9 ай бұрын
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?
@mariazinchyn
@mariazinchyn 2 жыл бұрын
Thank you!
@world-observer3460
@world-observer3460 Жыл бұрын
The DI concept is confusing me for a while util i see this clip. Really good work Bro.
@Ezzedini
@Ezzedini 2 жыл бұрын
is there a video after this to recommend to understand the rest of annotations in spring framework?
@hamzaa7335
@hamzaa7335 2 жыл бұрын
Bro I love your Videos, where you learned this all?
@SeanCarter
@SeanCarter 2 жыл бұрын
What’s that lighting setup? The video is crispy.
@mohammadsaht5602
@mohammadsaht5602 2 жыл бұрын
keep up my friend always check new videos
@lxdzii
@lxdzii 2 жыл бұрын
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
@willofd1683
@willofd1683 2 жыл бұрын
HI! PLease which app are you using to make this schema? Thanks
@Kim-tr5op
@Kim-tr5op 2 жыл бұрын
do u have a vid about testing in spring?
@xiaocatcat
@xiaocatcat 2 жыл бұрын
Hope you explain more about OOP. Thanks
@frodggy2714
@frodggy2714 2 жыл бұрын
great video. keep it going brother.
@liledg2357
@liledg2357 2 жыл бұрын
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
@tunamusic2314
@tunamusic2314 Жыл бұрын
yupp put autowired annotation so it can be automatically injected
@tanoryjakaperdana1419
@tanoryjakaperdana1419 6 ай бұрын
Wa'alaykumsalam my brother
@borhan_sahed
@borhan_sahed 2 жыл бұрын
Assalamu alaikum brother. Your videos are too good. Will the bootcamp be available free of cost ?
@taneatrifon6627
@taneatrifon6627 Жыл бұрын
what's the previous video of this course?
@umitkirtil
@umitkirtil 2 жыл бұрын
thank you for great tips and concept topics like this. Asselamu aleikum
@user-rl5pb5un2f
@user-rl5pb5un2f 2 жыл бұрын
Helpline📲📥⬆️ Questions can come in⬆️.
@YT-vx9sz
@YT-vx9sz 2 жыл бұрын
Bro I was just searching for a good video on this topic😂
@joaosantos6868
@joaosantos6868 2 жыл бұрын
Qual o tema e a fonte que você está usando? Ótimo conteúdo
@pablo-2349
@pablo-2349 2 жыл бұрын
its a good programing coure? sorry for bad englisch
@jenaman0001
@jenaman0001 2 жыл бұрын
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..
@talbiabdelali5914
@talbiabdelali5914 2 жыл бұрын
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!
@VforVanish
@VforVanish 2 жыл бұрын
NestJS does the same thing! Good tutorial thanks!
@erickjhormanromero6905
@erickjhormanromero6905 2 жыл бұрын
Angular too. remember nest is for Node
@yaphetb5717
@yaphetb5717 2 жыл бұрын
Thanks for this video nelson✌. Can you cosider doing a video on payment integration in spring boot?
@hitstick567
@hitstick567 2 жыл бұрын
Can you do a video on programminng to interfaces in Java?
@ahmedbishree9429
@ahmedbishree9429 2 жыл бұрын
Essalamo Aleykum bro is there any book that you can advise us with to get a deep understanding for the dependencies injection?
@Aswodel
@Aswodel 11 ай бұрын
Where is the previous video before this? you say: "earlier in this course we..." is that video available on KZbin? Or do we need to pay? And if so, where?
@lisafox9026
@lisafox9026 9 ай бұрын
9:16 if Carservice has 10 fileds, it must be 10 parameters in condtructor?
@murrayKorir
@murrayKorir Жыл бұрын
If Spring boot was never invented I would never have continued and loved java.
@aoboyang8735
@aoboyang8735 2 жыл бұрын
Is there a play list?
@jivanmainali1742
@jivanmainali1742 2 жыл бұрын
Could not get how DI makes testable and loosely coupled code?
@KlanBr1
@KlanBr1 2 жыл бұрын
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
@sanamudash4976
@sanamudash4976 2 жыл бұрын
Make video on micro services
@VenkateshKamazg
@VenkateshKamazg 2 жыл бұрын
Its already there
@kareem7236
@kareem7236 2 жыл бұрын
Salam alikum Amigo , What should I now to be ready to start with Spring ? Pleas let me now 🤗
@lrzero1362
@lrzero1362 2 жыл бұрын
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.
@San.Man___
@San.Man___ 7 ай бұрын
CDI in Jakarta EE😄
@Mrboo9413
@Mrboo9413 2 жыл бұрын
May Allah reward you for those explanations.
@SnehaJPai
@SnehaJPai Жыл бұрын
Then why do we use @Autowired annotation? How is it different from this scenario?
@navjotsingh2457
@navjotsingh2457 3 ай бұрын
Ty
@luisuran4050
@luisuran4050 2 жыл бұрын
What's with emo service?
@mcgruff0972
@mcgruff0972 2 жыл бұрын
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.
@alessiobino8248
@alessiobino8248 2 жыл бұрын
great video !!
@CarlosVera-jy7iy
@CarlosVera-jy7iy 2 жыл бұрын
Greetings amigos code, because I do not receive any information from the bootcamp to my email I have already registered
@zafarjonolimov2953
@zafarjonolimov2953 2 жыл бұрын
Waalekum assalam...
@hamza_Techy
@hamza_Techy 2 жыл бұрын
Great!❤️
@MwauraXavier
@MwauraXavier 2 жыл бұрын
Perfection.
@m5a1stuart83
@m5a1stuart83 2 жыл бұрын
Waalaikum Salam brother
@studdiougrym5633
@studdiougrym5633 Жыл бұрын
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.
@ElvinMayenCarrillo
@ElvinMayenCarrillo Жыл бұрын
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?
@HousseinDroubi-o9i
@HousseinDroubi-o9i 8 ай бұрын
وعليكم السلام ورحمة الله, الحمد لله.
@sharadsingh2856
@sharadsingh2856 Жыл бұрын
Awesome
@boristhedestroyerofancient508
@boristhedestroyerofancient508 2 жыл бұрын
Based video - as always!
@thapelomorare1484
@thapelomorare1484 2 жыл бұрын
Do Jsp and servlets
10 Spring and Spring Boot Common Mistakes You Need To STOP
15:49
Amigoscode
Рет қаралды 163 М.
10 Most Common Java Developer Mistakes
16:13
Amigoscode
Рет қаралды 113 М.
Cat mode and a glass of water #family #humor #fun
00:22
Kotiki_Z
Рет қаралды 42 МЛН
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 45 МЛН
Каха и дочка
00:28
К-Media
Рет қаралды 3,4 МЛН
Dependency INVERSION vs Dependency INJECTION in Python
17:51
ArjanCodes
Рет қаралды 164 М.
JAVA DTO Pattern Tutorial | Simplify Your Code
19:12
Amigoscode
Рет қаралды 221 М.
Should You Use Dependency Injection Frameworks?
14:43
ArjanCodes
Рет қаралды 46 М.
Learn SOLID Principles with CLEAN CODE Examples
28:35
Amigoscode
Рет қаралды 284 М.
the right way to organise your code
17:33
Amigoscode
Рет қаралды 204 М.
Dependency Injection, The Best Pattern
13:16
CodeAesthetic
Рет қаралды 910 М.
Spring Security Architecture Explained
14:41
Amigoscode
Рет қаралды 120 М.
Dependency Injection & Inversion of Control
11:00
Ryan Schachte
Рет қаралды 202 М.
Dependency Injection | Prime Reacts
28:34
ThePrimeTime
Рет қаралды 366 М.
Cat mode and a glass of water #family #humor #fun
00:22
Kotiki_Z
Рет қаралды 42 МЛН