Common questions about Solid

Short answers, pulled from the story.

When did Robert C. Martin publish the paper that laid the groundwork for SOLID principles?

Robert C. Martin published the paper titled Design Principles and Design Patterns in the year 2000. This document established five core principles intended to combat software rot before the acronym existed.

Who coined the term SOLID and when did this happen?

Software consultant Michael Feathers coined the term SOLID by 2004 to encapsulate the five rules established by Robert C. Martin. This mnemonic became the bedrock of object-oriented programming.

What does the Single Responsibility Principle require a class to have?

The Single Responsibility Principle dictates that a class should have only one reason to change. This forces developers to isolate specific behaviors into distinct units to prevent fragile code.

What is the core directive of the Open-Closed Principle?

The Open-Closed Principle states that software entities should be open for extension but closed for modification. Developers add new code rather than altering existing working code to prevent bugs in stable systems.

What rule did Barbara Liskov establish regarding base and derived classes?

Barbara Liskov established the Liskov Substitution Principle which requires that functions using base classes must be able to use derived classes without knowing the difference. This ensures subclasses adhere to the contract defined by their parent classes.

What does the Dependency Inversion Principle require high-level modules to depend on?

The Dependency Inversion Principle requires that high-level modules should not depend on low-level modules but both should depend on abstractions. This inverts the traditional dependency structure to make systems more flexible and easier to test.

Up Next