SOLID-Principles

What is SOLID ?

  • SOLID is a popular set of design principles that are used in object-oriented software development.
  • SOLID is an acronym that stands for five key design principles:

S => Single responsibility principle

O => Open-closed principle

L => Liskov substitution principle

I => Interface segregation principle

D => Dependency inversion principle

Why SOLID ?

While successful software change and develop it becomes increasingly complex. Without good design principles, this software becomes rigid, fragile, immobile, and viscous. The SOLID principles were developed to combat these problematic design patterns.

The broad goal of the SOLID principles is to reduce dependencies so that engineers change one area of software without impacting others. Additionally, they’re intended to make designs easier to understand, maintain, and extend. Ultimately, using these design principles makes it easier for software engineers to avoid issues and to build adaptive, effective, and agile software.

While the principles come with many benefits, following the principles generally leads to writing longer and more complex code. This means that it can extend the design process and make development a little more difficult. However, this extra time and effort is well worth it because it makes software so much easier to maintain, test, and extend. Following these principles is not a cure-all and won’t avoid design issues. That said, the principles have become popular because when followed correctly, they lead to better code for readability, maintainability, design patterns, and testability. In the current environment, all developers should know and utilize these principles.