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

Related Articles:

Post Footer automatically generated by Add Post Footer Plugin for wordpress.

About Chad Myers

Chad Myers is the Director of Development for Dovetail Software, in Austin, TX, where he leads a premiere software team building complex enterprise software products. Chad is a .NET software developer specializing in enterprise software designs and architectures. He has over 12 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 a 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.
This entry was posted in Uncategorized. Bookmark the permalink. Follow any comments here with the RSS feed for this post.
  • Joe

    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

    • http://www.facebook.com/people/Deborah-Smith/100002400274841 Deborah Smith

       I’m really loving the theme/design of your blog. Do you ever run into any internet browser compatibility problems? A couple of my blog audience have complained about my website not operating correctly in Explorer but looks great in Chrome. Do you have any suggestions to help fix this problem?
      phonebook

  • Raji Abraham

    I read these principles and more in the book by Bertrand Meyer (Object Oriented Software Construction – Prentice Hall International) more than a decade ago; though not per this acronym

  • Gurgaon Properties

    i truthfully enjoy your own writing kind, very remarkable,
    don’t give up as well as keep writing due to the fact that it simply just worth to follow it.
    looking forward to see a whole lot more of your current well written articles, enjoy your daySEO Services Company