The SOLID Principles

Note: This was originally written and published on the internal Armakuni Slack, by

Tom Oram

I think the SOLID principles are the foundation of writing great object-oriented software, so Iā€™m starting with them. While this may be something you already know, the aim of the topics of the day is to put everyone on the same page and to start a discussion.

The SOLID principles of OOP are five principles which should be applied when writing object-oriented code to ensure that the coupling is low, the cohesion is high, the code is testable and extensible, and the ability to be agile is maximised.

The SOLID Principles are:

  • The Single Responsibility Principle (SRP)

  • The Open/Closed Principle (OCP)

  • The Liskov Substitution Principle (LSP)

  • The Interface Segregation Principle (ISP)

  • The Dependency Inversion Principle (DIP)

The next five topics will look at each of these in turn.

Q. How much do you think about these principles while writing code?

Previous
Previous

Coaching for Consulting Success

Next
Next

Hexagonal Architecture