SOLID Principles: Explained with really simple real-life examples

Jesús Lagares
CodeX
Published in
6 min readAug 29, 2022

--

In my first job as a Backend Developer I had to learn what SOLID principles are. At first, I couldn’t understand them correctly and I don’t know how to apply them. But with practice, I’ve discovered the huge impact they had on my way to write code and the great improvement my code had since I started using these principles.

In this article, I’m going to explain roughly SOLID Principles and give you some real-life examples so that you can understand them better. However, you’re not going to find an advanced explanation of these principles and you’re not going to find any code examples in this article. This article’s only to learn and understand these principles. But don’t worry, I will explain them in deep in the future.

Are you ready to become a better developer? Let’s start.

What are the SOLID Principles?

Robert C. Martin introduced the SOLID principles in his paper “Design Principles and Design Patterns”. There are design principles (good practices which encourage us to create more flexible, maintainable, and readable software). If we follow these principles, we can write better code.

SOLID is only the initials of:

  • Single Responsibility.
  • Open/Closed.

--

--

Jesús Lagares
CodeX

Backend Software Engineer @ Nova | Tech Content Creator @ AlpacaTech | Writing about software development and technology 💻✨.