The most popular of the SOLID design principles, the single responsibility principle dictates that a class should have only one reason to change. To illustrate this a bit more, let's dig into a simple example.
Open-Closed? Huh? This is one of those principles that developers often skip over. Don't! These techniques are paramount to mature design.
Coined by Barbara Liskov, this principle states that any implementation of an abstraction (interface) should be substitutable in any place that the abstraction is accepted.
The Interface Segregation Principle states that a client should never be forced to implement an interface that it doesn’t use. As you'll find, this all comes down to knowledge. Learn what I mean by that in this lesson.
There's a common misunderstanding that "dependency inversion" is simply another way to say "dependency injection." However, the two are not the same. So let's dive in and figure this out!