Just began my career in Software Engineering and went over SOLID today. This was almost exactly like the examples shown in my training! This is a great, quick way to introduce yourself to using design principles in code. Thank you :)
First - Thank you for your time and efforts to create and educate. Now - there is one thing about SRP that I keep asking. How you can build a car if you car class needs to: start engine, accelerate, steer, decelerate, apply breaks, etc. Lots of responsibilities and no way to escape them. We can create each sub-object separately, like engine, tires, steering system, which can have only one responsibility but in the end we need to combine them. Just like you OrderProcessor - has lots of responsibilities. So ... ??
No, as you can see these were just examples and did not have any code inside of the body of the methods. The idea is to walk through the principles and how to implement the interface/class structure.
Thank you DotNet Core Central for this video. Liskov Substitution Principle example is pretty much similar to Interface Segregation Principle. Please explain difference between this two, it would be much more helpful.
@Trupti Jogi, thanks for watching! Liskov substitution principle at the core suggests using an Interface instead of concrete classes. Now this interface can have multiple methods. Whereas Interface segregation mainly talks about breaking interfaces so that you do that have an overloaded interface. Please let me know if it makes sense.
For Open Closed Principle example, I think instead of making IOrderSaver[] you could have the cache repository get a db IOrderSaver itself and route the save through while being a cache itself. This way really no modification was needed to the "other" module. Brings the point across better IMHO. But thanks alot with those examples!!!
Hi, I have seen your JWT implementation video, I guess in several scenarios like creating token classes are not based on SOLID Principles, Can you please make a video on how can I apply SOLID principles on JWT Implementation. I have implemented the same using SOLID principle in all the parts but I am unable to generate JWT and Refresh tokens with Constructor Injection. Is their any workaround or how to go about it. Please help me out.
I think LSP is more about what Animals/Birds have in common. If Animal sleeps, eats and poops then the Bird should still eat, sleep and poop without touching anything about that behavior, neither in the super or subclass. So should do Ostrich, etc.
Hello, in Open-closed principle you are suggesting instead of creating another method, we must come up with another type (possibly) and use Interface here for common functionality. But don't you think doing way we will end up creating multiple classes for each functionality required. There may be some exception when we can extend any existing class, could you please mention them, btw great explanation.
@Bhupender Singh , thanks for watching! I personally prefer to keep classes small and responsible for only a single task. And from my experience, I have seen is-a relationship (inheritance) causes long-term pain, whereas has-a (composition through the interface) is much easier to scale when your codebase grows. please let me know if it makes sense why I am advocating for a new class instead of adding a new method.
@darkydrone, thanks for watching. I prefer single responsibility for every class, which most of the time ends up being one public function. There are exceptions but mostly one public function per class. But that's just my preference.
@Themis Theotokatos, what you are mentioning is for only the first principle. The Open/Close principle is a little different as I explained in the video.
i feel the explanation of closed and open and single purpose are too strict as these are open to interpretation as to what a "single purpose" is, as in our workplace we have one class for dealing with the CRUD of each type of data thats seperated into 3 levels of classes, controller class logic class and repository class (and ofcourse the actual shape of the data in its own class) thats what we mean by single purpose, whereas this is single class for method almost. I see no down side in having methods that handle the same type of data in one class, and see a huge mess of files all using the same type for data they are passing and wouldnt consider this what single purpose means. I cant imagine an actual senrio where that would be helpful. we have multiple large projects using single purpose as dealing with single type of data and thats how controllers are auto generated by microsoft.
I think you're taking single responsibility literally. Having an interface for every granule functionality will lead too 1000s of interfaces. Why not IOrderManager have all managing functionalities since crud is managing responsibility.
Just began my career in Software Engineering and went over SOLID today. This was almost exactly like the examples shown in my training! This is a great, quick way to introduce yourself to using design principles in code. Thank you :)
Thanks
Your content is actually amazing. Like im not kidding your videos are so good. Keep it up man
@Arian A, thanks for watching the video, and appreciate your feedback!
Clean, crisp and up to the point. Well done.
@Gokul Kumar, thanks for watching!
Finally found a video that takes less than 30 min to explain this and even with examples 🙏🏽
Thanks!
This is amazing and crystal clear! Good job, and thank you!
@Raisa Gandi Putri, thanks for watching!
Perfect and precise demonstration of the SOLID principles... amazing!
@Supriyo Chatterjee, thanks for watching!
You did a wonderful job breaking this topic down. Firs t video I have watched where I actually feel like I understand SOLID
@Kim TB, thanks for watching!
Crisp and clear. Thanks!
@Praveen Kumar, thanks for watching!
Great explanation. Thanks for the video.😊
Thanks
Clear and straight to the point. Well done 👍🏾
@Alexander Agyapong, thanks for watching!
Thanks for the clear video on SOLID principles for people who are not from IT Background..
Thanks for watching!
Thank you for very small, clean and clear explanation, keep up doing the good work :)
@Manju Naika, thanks for watching!
Its good explanation and very easy for understanding...
Thanks for sharing! 🙏
Thanks!
so far the best explannation
Clearly Explained. Thanks
Thanks for watching!
First - Thank you for your time and efforts to create and educate.
Now - there is one thing about SRP that I keep asking. How you can build a car if you car class needs to:
start engine,
accelerate,
steer,
decelerate,
apply breaks,
etc.
Lots of responsibilities and no way to escape them.
We can create each sub-object separately, like engine, tires, steering system, which can have only one responsibility but in the end we need to combine them.
Just like you OrderProcessor - has lots of responsibilities.
So ... ??
Man, thank so much for explaining this very well!
@TEAM SIGAME, thanks for watching!
Hello . Sorry i asking for the first code OrderProcessor thats in controller or services file ?
Very good explanation . Thank you
Glad it was helpful!
Simple and clear explanation exept dependency inversion principle
@Rahul Gharat, thanks for watching!
Well done! Thank you very much. Your video is very helpful.
Glad it was helpful!
Awsome. Objective and clear. Thank you so much dude ...
@Everton Luiz Bastiani, thanks for watching!
This is realy amazing video...thanks sir
@Rajiv Singh, thanks for watching!
Great Article
Very well explained! Keep up the good work!
@Knightmare RIP, thanks for watching!
Cool explaination, gratz
Thanks for watching!
Actually good examples, great video!
@AlexeyTea, thanks for watching!
Thanks for this video.
@A P, thanks for watching!
Well explained, thank you.
Thanks!
Very clear! Really useful. ❤️❤️❤️❤️
@Victory Victorious, thanks for watching!
Thanks, really helped me grasp an understanding for SOLID.
@John Baltes, thanks!
The code which you had explained will it execute and give output??
No, as you can see these were just examples and did not have any code inside of the body of the methods. The idea is to walk through the principles and how to implement the interface/class structure.
very good explanation
@Gav Majha Khandnal, thanks!
Great Job bro. Keep rocking
@Mahendra balan, thanks for watching!
is that dependency inversion that you have used in 7:36 during the process of explaining the single responsibility principle? Thank you in advance
Nicely explained..
Thanks!
nice and precised explanation👍👍
@ABHINAV LADDHA, thanks for watching!
Thank you DotNet Core Central for this video. Liskov Substitution Principle example is pretty much similar to Interface Segregation Principle. Please explain difference between this two, it would be much more helpful.
@Trupti Jogi, thanks for watching!
Liskov substitution principle at the core suggests using an Interface instead of concrete classes. Now this interface can have multiple methods.
Whereas Interface segregation mainly talks about breaking interfaces so that you do that have an overloaded interface.
Please let me know if it makes sense.
For Open Closed Principle example, I think instead of making IOrderSaver[] you could have the cache repository get a db IOrderSaver itself and route the save through while being a cache itself. This way really no modification was needed to the "other" module. Brings the point across better IMHO. But thanks alot with those examples!!!
@Kevin KDSBest, thanks for watching! And thanks for the great example on Open/Closed principle.
Really very nice explaination. helped me to understand SOLID principles.
thumbsup man👍
@Mahesh Bhat, thanks for watching!
Thanks a lot . It’s help me a lot .
@Ashutosh Mishra, thanks for watching!
Hi, I have seen your JWT implementation video, I guess in several scenarios like creating token classes are not based on SOLID Principles, Can you please make a video on how can I apply SOLID principles on JWT Implementation. I have implemented the same using SOLID principle in all the parts but I am unable to generate JWT and Refresh tokens with Constructor Injection. Is their any workaround or how to go about it. Please help me out.
@Manju Naika, I will take a look and see if I can help you out with that.
Understandable. Thanks!
@yashodha srimal, thanks for watching!
excellent
thanks
I think LSP is more about what Animals/Birds have in common. If Animal sleeps, eats and poops then the Bird should still eat, sleep and poop without touching anything about that behavior, neither in the super or subclass. So should do Ostrich, etc.
F* greate content dude, amazing, thanks
@Leonardo Henrique, thanks for watching!
Thanks
Amazing content but can you make or have a video for all important shortcuts... like you used 'ctor' for constructor...
@Rahul Ghatkar, thanks for watching! I will create a video on shortcuts.
@@DotNetCoreCentral Sure thanks 😊
Thank you so much
@Mahendran Chinnaiah, thanks as always for watching the video!
Hello, in Open-closed principle you are suggesting instead of creating another method, we must come up with another type (possibly) and use Interface here for common functionality.
But don't you think doing way we will end up creating multiple classes for each functionality required.
There may be some exception when we can extend any existing class, could you please mention them, btw great explanation.
@Bhupender Singh
, thanks for watching!
I personally prefer to keep classes small and responsible for only a single task. And from my experience, I have seen is-a relationship (inheritance) causes long-term pain, whereas has-a (composition through the interface) is much easier to scale when your codebase grows.
please let me know if it makes sense why I am advocating for a new class instead of adding a new method.
Thank you !
@Saurabh Chauhan, thanks for watching!
Thank u so much dude..u explaination is awesome. Please create videos on design patterns also. If possible
@Raviteja Voleti, thanks for watching! In design patterns, what exact pattern you are looking for?
Hi can you do a video for each principle in SOLID? in depth tutorial but can easily understand by beginners.
@Kiro Keizeki, thanks for watching! Sure I will do.
Making a class for every single method is a bit of an overkill for me.
@darkydrone, thanks for watching. I prefer single responsibility for every class, which most of the time ends up being one public function. There are exceptions but mostly one public function per class. But that's just my preference.
So basically you create classes and each class has one simple method in it for the first two principles ?
@Themis Theotokatos, what you are mentioning is for only the first principle. The Open/Close principle is a little different as I explained in the video.
i feel the explanation of closed and open and single purpose are too strict as these are open to interpretation as to what a "single purpose" is, as in our workplace we have one class for dealing with the CRUD of each type of data thats seperated into 3 levels of classes, controller class logic class and repository class (and ofcourse the actual shape of the data in its own class) thats what we mean by single purpose, whereas this is single class for method almost.
I see no down side in having methods that handle the same type of data in one class, and see a huge mess of files all using the same type for data they are passing and wouldnt consider this what single purpose means. I cant imagine an actual senrio where that would be helpful. we have multiple large projects using single purpose as dealing with single type of data and thats how controllers are auto generated by microsoft.
I think you're taking single responsibility literally. Having an interface for every granule functionality will lead too 1000s of interfaces. Why not IOrderManager have all managing functionalities since crud is managing responsibility.
I don't understand
Why still you guys take example of birds and animals??
Lack of creativity?