Learn Dependency Injection and Write Better Code

preview_player
Показать описание
Dependency Injection is a concept that you need to master. It helps to write code that scales and code that can be tested.

#amigoscode #dependencyinjection #java

Don't Forget to
===========================================

⭐ Table Of Contents ⭐
===========================================
00:00 - Intro
01:31 - Dependency Injection
21:15 - Outro

🙊 Here are the goods for all my videos video 🙊

► Recommended Books
===========================================

► Computer and Monitor
===========================================

► Camera Gear
=============================================

► IDE & Tools I use for coding 💻 🎒
===========================================
- ITerm
- VsCode
- GoLand
- IntelliJ Ultimate
- Sublime

P.S
===========================================

❤️ Thanks for watching
Рекомендации по теме
Комментарии
Автор

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).

terrah
Автор

The best explanation of the dependency injection and the singleton pattern! Simple and to the point!

johnnya
Автор

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.

Secretclaps
Автор

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 ;)

bartex
Автор

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

ahmedbishree
Автор

I've been stuck to this for days, thank you!

haihoangninh
Автор

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.

Diego-Garcia
Автор

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.

Griefed_
Автор

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.

_freeworld
Автор

Thank you! You explained it very clearly

jeff_tech
Автор

Can't wait for the course to come out!

SiyaNtombela
Автор

I always love your tutorial. You make everything clear and simple.

nguyenminh
Автор

You're amazing! Saying hi from the Philippines.

jaymarkalvarez
Автор

Just small thing, at 15:55, if HEAP is full, you will get OutOfMemoryError, and not StackOverflowError.

thEstRonGr
Автор

Amazing explanation, Congrats from Brazil !!!!

RicardoSilvaTripcall
Автор

Just in time! I am writing my MSc thesis and this information is valuable!

andrekreou
Автор

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 😊❤

kopilkaiser
Автор

Wow, the best video for beginners. Thanks sir for your video, so sweet explants about the proccessing.

kuchdarith
Автор

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.

paulo__vieira
Автор

Thank you so much! Fantastic explanation! 💛

kostiantynkarzhanov