Showing posts with label SOLID. Show all posts
Showing posts with label SOLID. Show all posts

Tuesday, September 25, 2012

SOLID advice from Telerik

The Telerik Blogs - Why SOLID Matters

One of the biggest struggles that developers have with adopting Unit Testing, whether it’s Test Driven Development (TDD), Behavior Driven Development (BDD) or even just Test Eventual Development (TED), is the difficulty some code is to test.  This is typically when code doesn’t follow the SOLID design principals. If you aren’t familiar with Robert C. Martin’s SOLID Principles, here is a quick summary.

There are five SOLID principals put forth by Robert (Uncle Bob) C. Martin.


Let’s talk about how SOLID can help make the day in the life of a .NET developer better.



What have we accomplished?  We changed our code so that it only does the one thing that is it supposed to, we removed the concrete implementation, and we injected our dependencies.  The code is still clean and concise, and pretty much the same number of lines that we had before the refactoring.

We are no longer dependent on the LoginService being implemented before we can test our code, get it checked in, and move on to the next feature request. We can test this code to make sure that it behaves as we expect, knowing that the dependencies won’t occlude the results.

Happy Coding!


While there's some Telerik stuff in this post, stating how their tools help in a given situation, it wasn't overly much and the great style and content outweighed the plugs my miles. We've all heard of SOILD, but the way Philip explains it in this article, with good examples and how it applies to the .Net Dev makes this article a keeper...

Wednesday, June 27, 2012

Help in understanding SOLID with the "SOLID by example" code sample project

CodePlex - SOLID by example

Source code examples to understood solid design principles. Most of them were taken from


Sometimes code says it all... And when wrapping your head around SOLID, code examples are really a must have.

Tuesday, February 28, 2012

Two words to code by... IDEAL CHALK [a mnemonic for OOP]

CodeProject - IDEAL CHALK mnemonic acronym and mnemonic images for Object Oriented Principles



The objective of this article is to present mnemonic acronym, mnemonic images and tag lines for easy remembrance of Object Oriented Principles other than the SOLID object oriented principles.

The object oriented principles SOLID, introduced by Robert C Martin, are well known and easy to remember in the Acronym form SOLID. The easy remembrance of the principles will aid and prompt the programmer in application of those principles in programming. Apart from the SOLID principles there are several other principles which are also relevant in the Object Oriented programming. If these principles are put in an acronym form, the remembrance and application of these principles in the programming can be made easy to the programmers. After trying for some time I have created an acronym for these principles as shown below:






I saw this and thought it officially cool (I wish I was smart enough to come up with good acronyms...).

Make sure you scroll down to the bottom and catch the "conversation" too.

Tuesday, July 26, 2011

A Good Guide for Proper Programming - “The Principles of Good Programming”

Christopher Diggins - The Principles of Good Programming

Over the years I have found that following a relatively small number of fundamental guiding principles has helped me become a much more effective programmer.

Today's post is a lightly edited repost from my blog at The Area, a web-site dedicated to users of Autodesk media and entertainment products. I came up with this list of principles to help with a recent C# training I gave, and I thought that members of the community could appreciate these principles and have some interesting insights to share.


All the principles, guidelines, rules, ninja lessons and Jedi Master traits that any developer should know (if not follow). What I liked was the presentation, short, sweet, easy to digest yet with links for further details.

(via Alvin Ashcraft's Morning Dew - Dew Drop – July 26, 2011)

Tuesday, June 14, 2011

Practical SOLID in Visual Studio - One example Solution

ASP Alliance - Creating a SOLID Visual Studio Solution

"The SOLID acronym describes five object-oriented design principles that, when followed, produce code that is cleaner and more maintainable. The last principle, the Dependency Inversion Principle, suggests that details depend upon abstractions. Unfortunately, typical project relationships in .NET applications can make this principle difficult to follow. In this article, I'll describe how one can structure a set of projects in a Visual Studio solution such that DIP can be followed, allowing for the creation of a SOLID solution. You can download the sample solution and use it as a starting point for your new solutions if you like.
We hear about SOLID allot, that it's the "right" way to build our projects, but when it comes to the day-to-day dev, what does it mean to use? Like how do we structure our Visual Studio Solutions to be SOLID like? That's what I liked about this article, it's a practical example of how we can organize our VS Solutions so we can fall into the pit of SOLID success... As icing on the cake, an example solution is provided too, which can be used as our own starting point.

Thursday, June 10, 2010

SOLID By [C#] Example Or “Stop talking about SOLID and show me the code…”

Refact your C# Code - SOLID on CodePlex

SOLID is a acronym to identify five basic design patterns :

…” [GD:Post Leach Level:98%]

CodeProject - SOLID by example

“Source code examples to undestood solid design principles. Most of them were taken from


SOLID by example - Change Set 67436


It’s one thing to hear about SOLID and another to see if in practice… A code snip is worth a thousand words (or something like that… ;)


Related Past Post XRef:
A short introduction to SOLID and DRY for the heads down dev

Wednesday, May 27, 2009

A short introduction to SOLID and DRY for the heads down dev

CodeProject - SOLID and DRY

“No, this isn't a commercial for deodorant.

It's funny how many developers become so entrenched in their company and projects that they seldom venture outside to see what is going in the bigger world of Information Technology. I see this often in my interviews: a senior developer has worked a company for several years, quickly rose to the top and is the "go to" guy and now is ready to be an "architect." The only problem is that they only know how to work on their VisualBasic 6.0 system and think the best architecture is pulling everything as ADO XML and using stylesheet transformations to drive the application (I say this tongue-in-cheek because this is a framework I worked with and implemented in my past).

My point is that sometimes we get stuck in what works for our system and it works well, but it's not always the right or best solution and we need to constantly challenge ourselves as software engineers (or whatever we call ourselves today) to stay on top of what's out there.

I decided to post this article in my C#er : IMage blog because I feel SOLID and DRY are very sound principles for software development and yet I constantly see people tripping over these concepts.

Let's tackle DRY first:

Don't Repeat Yourself

SOLID is an acronym for:

  • Single Responsibility Principle
  • Open/Closed Principle
  • Liskov Substitution Principle
  • Interface Segregation Principle
  • Dependency Inversion


Like Jeremy mentions it’s very easy for us to get stuck in a rut. When our paycheck depends on us being heads down dev’s, working to solve the latest emergency, implementing “must have now” feature requests and juggling people issues, we sometimes find it hard to break out and look at the forest instead of the trees. And we’ve all been burned a little by the hype rush. How many methodologies, practices, procedures, etc, etc have we seen come and go? We have stuff we need to do today, to solve “this” issue, to make this customer happy, to pay the bills and keep our jobs…

So do we give up? Just keep our heads down and code?

Only if you want that rut to become your professional grave.

Our industry is so young and moving so fast, you HAVE to keep your mind open. We are all growing with it, learning and pretty much making it up as we go. We’re all running this race, but remember it’s a marathon and not a dash. We’re all in the same boat. Well we can be in the same boat, unless you give up, jump out and just look to tread water. That might make sense now, this year and next… but 10 years from now? 20?

I’m not saying you don’t have to jump on every bandwagon. No one has time for that. I’m just saying look at them with an open mind and see if there’s anything that can help. I’d bet there’s a thing here, a technique there that can help you in your “today” world. You’ll find it amazing how adding a little here and there can build up over time. You just have to look with a mind that’s open to change…

As for being burned by past hype’s? Remember failure isn’t bad, it’s how we grow. In many cases, we learn more by failure than success. Stand up, brush yourself off and then try something different.


Wow… That touched a nerve didn’t it? Think I was preaching at you? Heck in reading it over, this was more for me than you! LOL Now I have to print this out and read to to myself while looking in a mirror.  :p

In any case I’ve been watching the SOLID space for a bit now and like what I see. I like the acronym and the concepts. Now to see what I can grab for my today world… ;)

Plus an article with an opening line like that deserved a second look… LOL