SOLID principles

Intermediate đź’» Tech / IT

Definition

Five object-oriented design principles that form a convenient acronym: Single responsibility, Open-closed, Liskov substitution, Interface segregation, and Dependency inversion. Developers memorize them for interviews then promptly violate them all in production.

Example Usage

This class violates basically every SOLID principle—it's doing database access, business logic, AND rendering HTML.

Origin

Principles developed individually in the 1990s-2000s, acronym coined by Michael Feathers around 2004

Fun Fact

The principles existed separately for years until someone realized they spelled SOLID, proving that good marketing matters even in software architecture.

Source: Object-oriented design and software engineering principles

Related Terms