in

 

Chad Myers' Blog

Department of Problem Prevention

Pablo's Topic of the Month - March: SOLID Principles

Pablo's Topic of the Month - March: SOLID Principlespablos_topic

Over the next few days and weeks, the Los Techies crew will be writing a number of blog posts focused a particular subject in addition to their regular blogging.  Pablo's Topic of the Month for the month of March is Bob Martin's S.O.L.I.D. design principles. We'll try to cover all of them by the end of the month or we might focus in on a few of them and go really deep.  Please stay tuned and please give us some feedback of how you like this format because we're considering doing it in upcoming months.

If you haven't already, please consider subscribing to the Los Techies Main Feed so that you can see the various post from the other Los Techies bloggers.

The main feed is here:  http://feeds.feedburner.com/lostechies 

What is S.O.L.I.D.?

S.O.L.I.D. is a collection of best-practice object-oriented design principles that you can apply to your design to accomplish various desirable goals like loose-coupling, higher maintainability, intuitive location of interesting code, etc.  S.O.L.I.D. is an acronym for the following principles (which are, themselves acronyms -- confused yet?).

These principles were pioneered and first collected into a written work by Robert 'Uncle Bob' Martin. You can find more details here: http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod

I'm going to give you a teaser here of each one, but I won't go into much detail here as that's what the other Los Techies articles are going to be about.  Please check back to this post as I'll be updating it with links to other posts as they appear so you can keep tabs on what's going on. 

The attribution of the following snippets goes to Robert Martin from various publications.

SRP: Single Responsibility Principle

THERE SHOULD NEVER BE MORE THAN ONE REASON FOR A CLASS TO CHANGE.

OCP: Open Closed Principle

SOFTWARE ENTITIES (CLASSES, MODULES, FUNCTIONS, ETC.) SHOULD BE OPEN FOR EXTENSION BUT CLOSED FOR MODIFICATION.

LSP: Liskov Substitution Principle

FUNCTIONS THAT USE ... REFERENCES TO BASE CLASSES MUST BE ABLE TO USE OBJECTS OF DERIVED CLASSES  WITHOUT KNOWING IT.

ISP: Interface Segregation Principle

CLIENTS SHOULD NOT BE FORCED TO DEPEND UPON INTERFACES THAT THEY DO NOT USE

DIP: Dependency Inversion Principle

A. HIGH LEVEL MODULES SHOULD NOT DEPEND UPON LOW LEVEL MODULES. BOTH SHOULD DEPEND UPON ABSTRACTIONS

B. ABSTRACTIONS SHOULD NOT DEPEND UPON DETAILS. DETAILS SHOULD DEPEND UPON ABSTRACTIONS

Comments

 

Joe said:

Look, I'm a big Bob Martin fan (reading Agile etc etc c# again right now), but who do we petition for the (Iranian-style) death penalty for anyone introducing another freakin' acronym?  And an acronym of acronyms at that...

Most of us (I hope) want the 501 developers we work with to adopt the principles we talk about, not roll their eyes and shove us out the door while deciding "f**k you, I'm dragging a datasource control and a datagrid onto this webform, you awful nonsensical ***che/gas-bag".

Standing athwart the agile blogosphere yelling Stop,

Joe

March 7, 2008 10:31 PM
 

DotNetKicks.com said:

You've been kicked (a good thing) - Trackback from DotNetKicks.com

March 9, 2008 3:25 PM
 

Reflective Perspective - Chris Alcock » The Morning Brew #49 said:

Pingback from  Reflective Perspective - Chris Alcock  » The Morning Brew #49

March 10, 2008 3:21 AM
 

Dew Drop - March 10, 2008 | Alvin Ashcraft's Morning Dew said:

Pingback from  Dew Drop - March 10, 2008 | Alvin Ashcraft's Morning Dew

March 10, 2008 7:01 AM
 

Guru Stop said:

This is the email I sent to the dev team in SilverKey Tech. Egypt dev team yesterday, sharing here as

March 11, 2008 8:14 AM
 

Ray Houston said:

In following suite with the The Los Techies Pablo's Topic of the Month - March: SOLID Principles

March 14, 2008 11:04 PM
 

http://www.lostechies.com/blogs/chad_myers/archive/2008/03/07/pablo-s-topic-of-the-month-march-solid-principles.aspx said:

March 16, 2008 3:27 PM
 

J.D. Meridth said:

The Single Responsibility Principle This post is about the first letter in Uncle Bob's SOLID acronym

March 28, 2008 9:15 PM
 

J.D. Meridth said:

The Single Responsibility Principle This post is about the first letter in Uncle Bob's SOLID acronym

March 29, 2008 8:22 PM
 

Christopher Bennage said:

I've been asked about best practices and good design several times over the last few months. A few

March 30, 2008 12:56 PM
 

Community Blogs said:

I've been asked about best practices and good design several times over the last few months. A few

March 30, 2008 1:26 PM
 

Chad Myers' Blog said:

Pablo's Topic of the Month - April: Advanced Language Patterns for Visual Basic Following on the

March 31, 2008 9:04 PM

Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add

About chadmyers

Chad Myers is a senior .NET software developer specializing in enterprise software designs and architectures. He has over 10 years of software development experience and a proven track record of Agile, test-driven project leadership using both Microsoft and open source tools. He is community leader who speaks at the Austin .NET User's Group, the ADNUG Code Camp, and participates in various development communities and open source projects.
Copyright Los Techies 2007. All rights reserved.
Powered by Community Server (Commercial Edition), by Telligent Systems