# 92 - Creating SOLID Code: Liskov Substitution Principle


3/11/2009
Level: Intermediate
Tags: SOLID Principle
Comments: (16)
Author:
Stephen Bohlen


This is the third in a 5 part series where we will explore the tenets of the S.O.L.I.D principles.

In this episode we will take a look at the L (Liskov Substitution Principle) and see how following this principle can help us to create cleaner, more manageable code

S - Single Responsibility Principle
O - Open/Closed Principle
L - Liskov Substitution Principle
I - Interface Segregation Principle
D - Dependency Inversion Principle
Click here to Watch this Episode

Download (17.38) (11:44) (1440x900)
Download (12.41) (11:44) (960x600)

Links/Resources:


Comments: (16)

Stephen Vinck said....

Great screencast Steve!!

Would it not be better to implement interfaces since the base classes don't have any code?

 

Stephen


3/12/2009 9:15:53 AM

Steve Bohlen said....

@Stephen:

Great point!  Now that you mention it, the base classes are starting to look like 'legacy warts' on the design rather than playing a useful role here any more!

You get the pair-programmer-bonus-of-the-month-award for pointing that out.  Maybe now I need to do an L.1 installment to clean that up :D

Thanks for the comment -- it points out the the narrow application of any one design principle can sometimes blind one to the quality of the overall design (I'm sure there's a forest-for-the-trees principle waiting to be named for that pattern too!).

Thanks for the feedback and I'm glad you're finding value in the content.

-Steve B.


3/12/2009 12:04:59 PM

Stephen Vinck said....

I sure find value in your screencasts. Keep up the good work!


3/12/2009 12:50:00 PM

Dale Smith said....

With this dimecast, we are now SOL.  Here's looking forward to I and D!


3/13/2009 8:29:18 AM

Dimecasts said....

@Dale,

What do you mean SOL?


3/13/2009 9:19:15 AM

Tormod said....

He means that the three first letters in SOLID have been covered.


3/14/2009 12:46:32 AM

Sebastien said....

Thank you for the SOLID screencasts. Very informative.

Stephen what Visual Studio pluggin are you using. I'd like to give it a try.


3/14/2009 11:37:13 AM

Steve Bohlen said....

You're seeing me use CodeRush + Refactor!Pro from http://devexpress.com.  I prefer these tools over the more-commonly-recommended Resharper but that's frankly naught but personal preference (I find the IDE integration of the visual cues from CR+R to be better than R# IMO).

Developer Express usually has fully-functional but time-limited trials of CR+R that you can download from their site if you're interested.

-Steve B.

PS: I make ZERO $$$ off any recommendations of tools so make your own choice for yourself and pick what yoiu find best suits you :)


3/14/2009 3:12:24 PM

Sebastien said....

Thanks Steve. I have used Resharper in the past. I will try this to compare.

 

 


3/15/2009 7:09:11 AM

Kris said....

Hello,

Please add your site at http://www.sweebs.com. Sweebs.com is a place where other people can find you among the best sites on the internet!
Its just started and we are collecting the best found on the net! We will be delighted to have you in the sweebs listings.

Regards
Kris


3/16/2009 4:02:06 AM

Dan said....

Great series! :)


3/18/2009 5:19:14 AM

Lynn Davis said....

The link to LSP was slightly tenuous don't you think?


4/12/2009 4:05:29 AM

pablo said....

Hi,

I tried to download this episode in iTunes but it returns a 404. Could you fix that (some others as well, I commented in every post that failed)?


5/31/2009 3:49:00 PM

al said....

Great episode! Thanks


6/21/2009 8:26:59 AM

arpit Rastogi said....

great and very useful article.

Thanks Stephen.


1/26/2010 9:53:46 AM

prettyreplica said....

Replica Watches Collection

Bvlgari Watches Replica, Swiss Rolex Watch Collection, Best Fake Watch ,Cartier Watches ,Discount Watches , Fashion Watches , Wristwatch, Fake Watch, Wholesale Watches, Jewelry Watches, Replica Jewelry Watches. How to choose Sales Replica Watches the perfect Rolex Watch IWC Fake Watch for you. Buying a Rolex Jewelery Watches watch is certainly a large Jacob & Co. Watch Replica investment, as Rolex Replica Watches watches certainly cost Emporio Armani Replica Watches more than the average wristwatch. Most Rolex watches such as the Rolex yacht master, cost Replica Watch thousands of dollars. Chopard Watch Replica However, Replica Breguet Watches be aware Fake Franck Muller that you will be buying a watch of TAG Heuer Watches that will not Replica Watches ,Jaeger LeCoultre Replica Watches only Ebel Watches Replica work your whole lifetime, it will also look pretty Replica Watch good doing it. However, a Zenith Replica new Replica Mont Blanc Watches Rolex watch may simply be too much money for some people. Wholesale Replica Watches If that is Replica Bvlgari the Replica Handbag case, Jacob & Co. Watch Replica consider buying a Ebel Wristwatch pre-owned Rolex watch Luxury Vacheron Constantin instead. Whether you buy a new or used Rolex watch, you will definitely enjoy the Rado Replica Watches use of Patek Philippe Mens Watches a finely made watch made by the Fake Chopard Watches finest watch company in the last one hundred Replica Watch years. A Gucci Replica Watch Rolex, watch, Replica Patek Philippe Watches omega or cartier wristwatch Luxury Audemars Piguet are all good investments,Ulysse Nardin Watches but the Swiss Luxury Watches Rolex is simply the best Special Watches .

watches brand | Luxury watches | replica hangbag | Luxury watches | replica watch | Very Nice Bag | Real Replica Watches

A Lange&Sohne Watches     Aigner Watches     Alain Silberstein Watches     Audemars Piguet Watches     Bell&Ross Watches     Breguet Watches     Breitling Watches     Bvlgari Watches Replica     Cartier Watches     Chanel Watches Replica     Chopard Watches Replica     Concord Watches     Corum Watches     D&G Watches     Dior Watches Replica     Ebel Replica Watches     Emporio Armani Watches     Ferrari Watches     Franck Muller Watches     Glashutte Watches     Gucci Watches     Hermes Watches     Hublot Watches     IWC Watches     Jacob&Co Watches     Jaeger LeCoultre watches     Longines Watches     Louis Vuitton Watches     Michele Watches     Montblanc Watches     Movado Watches     Omega Watches     Oris Watches     Panerai Watches Replica     Patek Philippe Watches     Philip Stein Watches     Piaget Watches     Porsche Design Watches     Rado Replica Watches     Raymond Weil Watches     Richard Mille Watches     Roger Dubuis Watches     Rolex Japan Watches     Rolex Swiss Watches     Sarcar Watches     Swiss Watch International     TAG Heuer Watches     Tissot Watches     Tudor Watches     Ulysse Nardin Watches     Vacheron Constantin Watches     Versace Replica Watches     Victorinox Swiss Watches     Zenith Watches  

Balenciaga ;   Bally     Burberry     Chanel     Chloe     Christian Dior     Coach     D&G     Fendi     Gucci Handbags     Hermes     Jimmy Choo Handbags     Loewe Handbags     Louis Vuitton Bags     Marc Jacobs Handbags     Miu Miu Handbags     Mulberry Handbags     Prada     Thomas Wylde Handbags     Versace Handbags     YSL Handbag  

A Lange&Sohne Watches     Aigner Watches     Alain Silberstein Watches     Audemars Piguet Watches     Bell&Ross Watches     Breguet Watches     Breitling Watches     Bvlgari Watches     Cartier Watches     Chanel Watches     Chopard Watches     Concord Watches     Corum Watches     Dior Watches     Dolce&Gabbana Watches     Ebel Watches     Emporio Armani Watches     Ferrari Watches     Franck Muller Watches     Glashutte Watches     Gucci Watches     Hermes Watches     Hublot Watches     IWC Watches     Jacob&Co Watches     Jaeger LeCoultre watches     Longines Watches     Louis Vuitton Watches     Michele Watches     Mont Blanc Watches     Movado Watches     Omega Watches     Oris Watches     Panerai Watches     Patek Philippe Watches     Philip Stein Watches     Piaget Watches     Porsche Design Watches     Rado Watches     Raymond Weil Watches     Richard Mille Watches     Roger Dubuis Watches     Rolex Japan Watches     Rolex Swiss Watches     Sarcar Watches     Swiss Watch International     TAG Heuer Watches     Tissot Watches     Tudor Watches     Ulysse Nardin Watches     Vacheron Constantin Watches     Versace Watches     Victorinox Swiss Watches     Zenith Watches  


2/1/2010 8:03:45 PM


Name: *
Email (not displayed): *
Url:
Comments: *



So, you Human...?



Submit this story to DotNetKicks
Shout it