Finally an awesome explanation. I like the way you combine the principles in your explanation. Also, a real world example helps a lot. I was always confused by the dependency inversion while I thought I would still depend on the low level module if I instantiate the concrete implementation in the high level module. But as you simply explained it, this part can be tackled by dependency injection. Thanks man! I will definitely check out others videos you have regarding SOLID principles and coding. Φοβερος!
Great explanation ! Q: Do we need to always declare the interface under high level module? What will happen if we declare the interface under low level module?
many thanks💙💙💙 could you please tell me how to inject the interface in the constructor ? I know that abstract classes and interfaces can not be instantiated so how will you use NotificationSettings class ??
Thank you. You will need to pass an implementation of the interface/abstract class. So the constructor has an interface as an argument, but thanks to polymorphism we can pass an actual object as long as it implements/extends the abstract interface.
Please show us how to use Clean Architecture. In the books Uncle Bob used an interactor pattern to initialize the dependencies -- would be nice if you could also, thank you for the tutorial.
This is the best explanation I have found so far! ❤️ If class A uses class B, then class A is a high-level module and class B is a low-level module. Is that correct?
Hi Mr. Reppas, Thanks for your videos. I need proper definition of Application Class and How to implement it if there is no Application Class in Android Project. A small app will b beneficial.
I have tried follow this way in my app. I gave the Preferences interface in to my Activity constructor. class MainActivity(val iPrefs: IPreferences) : AppCompatActivity() It does not work: java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{***********.MainActivity}: java.lang.InstantiationException: java.lang.Class has no zero argument constructor
Another gem from Mr Reppas!!! Can’t wait to see what’s next!
Thank you mr. Kaniras! I appreciate it:)
Thanks for the video, the only one made me understand the Dependency Inversion
Totally appreciate that!
Great video,,,, thank you so much 🌹🌹🌹🌹🌹🌹
Thanks alot, you made this principle and its advantages very clear to me!
Super glad to hear that Jan, you are welcome!
Finally an awesome explanation. I like the way you combine the principles in your explanation. Also, a real world example helps a lot. I was always confused by the dependency inversion while I thought I would still depend on the low level module if I instantiate the concrete implementation in the high level module. But as you simply explained it, this part can be tackled by dependency injection. Thanks man! I will definitely check out others videos you have regarding SOLID principles and coding. Φοβερος!
Nice explanation, thank you
I am glad you liked it, thank you! :)
Great vid!
Very well explained. Thank you!
Thank you so much :)
Great series! Thank for that. Enjoyed watching and learning.
Really glad about that! Thanks for commenting.
you should be given an award. You just made the Dependency inversion principle very easy to understand, thanks and you just gained a new subscriber👍
Thank you very much! It means a lot :)
Thank You
Great explanation !
Q: Do we need to always declare the interface under high level module? What will happen if we declare the interface under low level module?
Thanks, It's a great video and I subscribed to your channel.
many thanks💙💙💙
could you please tell me how to inject the interface in the constructor ?
I know that abstract classes and interfaces can not be instantiated
so how will you use NotificationSettings class ??
Thank you.
You will need to pass an implementation of the interface/abstract class. So the constructor has an interface as an argument, but thanks to polymorphism we can pass an actual object as long as it implements/extends the abstract interface.
Please show us how to use Clean Architecture. In the books Uncle Bob used an interactor pattern to initialize the dependencies -- would be nice if you could also, thank you for the tutorial.
Planning on creating a series on AndroidnClean Architecture so keep an eye out in the near future! Glad you liked it:)
@@KonstantinosReppas lovely!!!
This is the best explanation I have found so far! ❤️
If class A uses class B, then class A is a high-level module and class B is a low-level module. Is that correct?
Hi Mr. Reppas, Thanks for your videos. I need proper definition of Application Class and How to implement it if there is no Application Class in Android Project. A small app will b beneficial.
Awesome! Please, make some videos about patterns - Builder, Factory, Adapter etc... Without android, on clean examples.
Tenet Protagonist after shooting an inverted bullet:
...wow.
Haha, nice one!
I can't see in your video how you can handle the NotificationSettings class in your Activity.
I have tried follow this way in my app. I gave the Preferences interface in to my Activity constructor.
class MainActivity(val iPrefs: IPreferences) : AppCompatActivity()
It does not work:
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{***********.MainActivity}: java.lang.InstantiationException: java.lang.Class has no zero argument constructor