Design Patterns: Liskov Substitution Principle Explained Practically in C# (The L in SOLID)

preview_player
Показать описание
When you are writing code, are you doing it right? That is a question that worries a lot of people, and it should probably at least be something every developer thinks through. Design patterns are best-practice concepts that we can implement into our code to make it better in some way. Think of them as guardrails that keep our code safe. In this video, we are going to look at the third entry in the famous SOLID principle. The L stands for the Liskov Substitution Principle. We are going to dive into what it means, how it should change our programming practices, and how far we should take it.

0:00 - Intro
1:32 - Demo code overview
3:04 - Liskov Substitution Principle: LSP Explained...
6:15 - Side note: Covariance and Contravariance, Preconditions Postconditions
10:17 - ...LSP Explained
13:58 - Considering the Open and close principle
17:24 - Implementing LSP: Refactoring demo code
29:23 - Note on abstraction in base classes
33:02 - Flexibility with LSP and Concluding remarks
Рекомендации по теме
Комментарии
Автор

0:00 - Intro
1:32 - Demo code overview
3:04 - Liskov Substitution Principle: LSP Explained...
6:15 - Side note: Covariance and Contravariance, Preconditions Postconditions
10:17 - ...LSP Explained
13:58 - Considering the Open and close principle
17:24 - Implementing LSP: Refactoring demo code
29:23 - Note on abstraction in base classes
33:02 - Flexibility with LSP and Concluding remarks

RalfsBalodis
Автор

3 years old but still quality content. Cheers man!

ethanvenencia
Автор

Great stuff, Tim! I have read about inheritance several times before, and now that I've watched this video, I think I have a waaaay better understanding of how to implement it. You have a great way of explaining rather complex concepts! Good on you.

kmorgan
Автор

Awesome work again Tim! Never understood LSP event after spending hours on the internet reading blogs and articles. Thank you so much!

pranaygawand
Автор

One of the best explanations I've ever found on this pricniple that sometimes it could be tricky or confusing. Thanks a lot!

sebainones
Автор

Best explanation i have seen, thanks for jumping straight to the code. I have always struggled to understand this principle, but now i understand it. Cheers Tim :)

callumhaynes
Автор

After going through multiple resources these are by far the best SOLID Principle explanations I've come across so far. I have a much better understanding now :)

vero
Автор

Thank you Tim. I studied this four five years ago and totally forgotton. Very good tutorial, thank you!

niyaziozturk
Автор

Thank you Tim ! Very clear and very useful explanation to me. It really is a very complete answer to the question that I posted in response to your OCP video. Looking forward to your next videos!

n
Автор

Thank you, Tim! You have a talent to explain everything in a simple way. I appreciate your work very much! Thank's again!;)

myemailvl
Автор

Thank you for this. This is by far the best explanation of Liskovs principle I have seen yet.

shacham
Автор

I try not to skip the ads as a thank you for your amazing content. Thank you.

shenamariedabalos
Автор

Learned so much in these 3 courses so far, this is seriously the best tutorial on SOLID that i came across.

xcyron
Автор

I found this more intuitive than the Open/Closed Principle. Excellent tutorial - thank you.

pw.
Автор

Great video. This is the first presentation that has enough clear explanation to solidify the LSP principles. Full marks.

mitchellbroue
Автор

Thank goodness, .. At last, a more practical example than the rest of the internet, ... Thank you TIM.

pradeepbetty
Автор

This is the best explanation on the internet for SOLID. Thank you for making separate videos with code demo for each topic, they are extremely helpful and after watching your seri on this topic, I don't feel vague a bout SOLID anymore

hayleyha
Автор

This might sound weird but I must say I regret not watching all of Tim Corey C# videos from the start of my programming journey. Would have saved me a lot of time. Thank you sir for the work you have done.

iandalrymple
Автор

That was a super example and a great explanation about interfaces. I now feel comfortable with interfaces.

jesphaylobo
Автор

Thanks Mr Corey. You are a Rockstar. I have been with Microsoft Technology Stack for 25 Years (MSDOS, Microsoft C) and keep trying to learn some of the things you know so well!!

LarryPeteet