SOLID Principles in 59 Seconds
What is SOLID?
SOLID is a set of five object-oriented software design principles. Together, they suggest how to divide responsibilities and manage dependencies so a change in one part of the code is less likely to require changes elsewhere.
The acronym stands for Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, and Dependency Inversion.
Shipping notifications
Suppose an online store emails customers when an order ships. Later, it needs to send the same update through text messages and push notifications, then add scheduling and tracking.
The company emails customers when an order ships.
The company decides to also send customer updates by text message and push notification.
The company wants to send updates at a chosen time and check whether the email, text, or push service accepted each message for sending.