SOLID Principles

  • S – Single Responsibility Principle
    • An object should have a single responsibility. Any additional responsibilities should be handled by other classes.
  • O – Open-Closed Principle
    • Classes should be able to be extended and given additional functionality, but the original code of the class itself shouldn’t be changed
  • L – Liskov Substitution Principle
    • A subclass object should be able to be passed into a function, structure, etc. which has its superclass as a parameter without any issues
  • I – Interface Segregation Principle
    • No class should have to implement interfaces or abstract superclass functions that it will not use
  • D – Dependency Inversion Principle
    • A subclass should only inherit and implement from interfaces and abstract superclasses

Leave a Reply