SOLID Principle in Ruby on Rails

SOLID Stands for:

  • Single responsibility principle
  • Open/closed principle
  • Liskov substitution principle
  • Interface segregation principle
  • Dependency inversion principle

The acronym stands for principles to help software engineers to create / write maintainable source code for long-term that use an OOPS language.

Single responsibility principle: Focus on One thing in a Class Seprately.

Open/closed principle: Class should be open for extension and closed for modification.

 Liskov substitution principle: The derived class must be capable of being substituted by its base class.

Interface Segregation principle:

Interface Segregation Principle (1996)

Dependency Inversion principle (DIP): Now a days used with Docker, Docker composer.

The Dependency Inversion Principle

Leave a Reply

Your email address will not be published. Required fields are marked *