WHAT & WHY ?
SOLID principles are the guidelines or standards which can help to develop a software codebase which is

  • Easy to read and understand logically
  • Easy to modify/change
  • Easy to maintain

When we develop any software we create components like classes, interfaces, structs, functions etc, this SOLID principles give us a valid reason where and when to employ them.

And if we don’t use them our decisions for writing code for these entities will have arbitrariness. And when it comes to team everyone will be doing a code on their personal understanding, which will lead to the Design-Smelling as below.

Rigidity: The software is difficult to change. A small change causes a cascade of subsequent changes.

Fragility: The software breaks in many places due to a single change.

Immobility: You cannot reuse parts of the code in other projects because of involved risks and high effort.

SOLID is a subset of of five principles as below:

  1. Single Responsibility Principle
  2. Open-Closed Principle
  3. Liskov-Substitution Principle
  4. Interface Segregation Principle
  5. Dependency Inversion Principle

Let’s explore each of the principles in depth.

iOS Engineer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store