# 96 - Creating SOLID Code: Dependency Inversion Principle


3/26/2009
Level: Intermediate
Tags: SOLID Principle
Comments: (10)
Author:
Stephen Bohlen


This is the last episode 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 D (Dependency Inversion 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 (21.02) (15:08) (1440x900)
Download (16.01) (15:08) (960x600)

Links/Resources:


Comments: (10)

Will said....

Thank you so much for this series.  It has been very much a nice refresher on things we all should know and practice.


3/26/2009 10:13:46 AM

Leslie said....

Great stuff. Thanks!


3/27/2009 5:09:38 PM

HumanIam said....

You are exchanging ABSTRACT base classes (report, reportprinter...) for the interfaces, although in the begining you are talking that it is fine to depend upon abstractions, e.g. abstract classes.

 

I would understand changing classic implementations, but not empty abstract base classes...

 

CONFUSED!


3/29/2009 6:39:14 AM

Xanf said....

Thank you for presenting the SOLID principles in such an accessible way, the other day when i've heard "Interface Segregation" in a podcast and went like "Aha, that one". Great job!


3/30/2009 1:21:29 AM

Erik said....

Thank you so much for all your great work. I feel that you are providing a great service to the programming community and you should be commended.

Just one comment on this episode but it may be a subject for a later dimecast. Wouldn't the super classes for Report and ReportPrinter have become redundant and so be able to refactor back to just a single concrete class?

I guess this is more a point for discussion rather then something that would be presented in this dimecast due to time.

Continue the great work :)


3/31/2009 4:03:02 PM

Ben said....

Really good stuff.Thanks


3/31/2009 5:58:45 PM

Steve Bohlen said....

@Eric:

Yes, there are absolutely several 'issues' that remain within the 'final' codebase and represent additional opportunities to improve the design; you have identified at least one of them.

Others (in this installment as well in several others of them) have pointed out many places where the 'design' still evidences some code-smells and could stand to be improved.

Without trying to make 'excuses' for my work, I think that the important parts of the series are NOT the results per-se but the concepts and the process.  Living within the constraints of the 10-minute time-frame meant some trade-offs in re: the 'perfection' of the results, but the point (of course) was much less about the results and much more about getting the principles across to viewers (as I think you are pointing out).

Thanks again for the feedback and I'm glad you were able to find value in the content!

-Steve B.


4/1/2009 7:05:38 AM

Pradeep said....

excellent webcasts, thanks Stephen.


4/2/2009 1:20:45 AM

PiRX said....

Thanks for good work with SOLID presentations.

As HumanIam mentioned, there is no reason for replacing abstract classes with interfaces, you can demonstrate DI as good with them. Then you could focus more on DI benefits and implement Eriks suggestion.


4/2/2009 11:09:59 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 7:59:07 PM


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



So, you Human...?



Submit this story to DotNetKicks
Shout it