8 resources to learn about SOLID design principles

Lately, I've been reading about the SOLID design principles. They were introduced by Robert C. Martin in his paper titled "Design Principles and Design Patterns". While these are no absolute rules, they can help you design better software.

Here are some different resources that teach the SOLID principles.

Book and articles

If you are a reader (like me), these are some great resources:

Principles of Package Design

This is the book I've read last week. The first 100 or so pages are about the SOLID principles, before switching to Package Principles. Besides the fact that Matthias Noback is a great teacher/writer (you should really check out his blog), I really liked the fact that he lists violations of each principle with clear code examples.

S.O.L.I.D: The First 5 Principles of Object-Oriented Design

For those of you that don't want to buy the book, Scotch has a great (and free) article that explains everything you need to know. It is somewhat shorter but contains PHP code samples for each rule.

Design Principles and Design Patterns

This is the original paper that Robert C Martin, aka Uncle Bob, wrote. Admittedly, I haven't read it myself, but since it is the "original" article it kind of deserves a place in this list.

How to get started with SOLID?

The SOLID design principles are "just that": principles. This is not an easy method to fix all your problems. I thought this explanation by Robert Martin was a great addition that talks about how and when to apply SOLID.

Talks and screencasts

If you don't like reading all that much, video's might be more suitable to learn. Here are some video's that explain the concepts of SOLID.

S.O.L.I.D. Principles of Object-Oriented Design

This talk by the Grace Hopper Academy is brief and succinct. It discusses all principles in about 10 minutes, which is way shorter than any other video or article in this list. It is definitely not the most thorough explanation but might be a great primer to introduce the core concepts.

SOLID Principles in PHP

Jeffrey Way has created many (I mean, many) screencasts on Laracasts that explain all different concepts about frontend and backend web development. If you already have an account this series might be a great resource for you.

SOLID Principles of Object Oriented and Agile Design

This is a talk by Robert C. Martin himself. Personally, I'm not a big fan of his style. He doesn't get to the point until after some lengthy introduction. When he does, however, you can be sure he explains everything in a clear and concise way.

Code examples

Like all things, practice makes perfect. That is why I wanted to find some real programming examples of "good" versus "bad" code. There's only 1 item on my list, I couldn't find more examples that I liked.

PHP code examples

Tran Duc Thang doesn't explain the SOLID principles but he does give great code examples. Be sure to learn about the principles first.

If you have good code examples, please leave a comment so I can add them to this article.

Keep reading

Here's some recent articles from this blog:

Comments (0)

Got a question? Liked the article or got a suggestion? Leave a comment to let us know.