Here's the source-code for a course on SOLID design principles and much used software design patterns that I once taught.
Although I'm no longer at hand to teach it, the course presentation should make it relatively easy to dive into it, for self-teaching purposes.
The - sufficiently annotated - source-code is in C#. But really the subject is language-agnostic, and might be easily converted into a different, similar object-oriented language.
As always I encourage issues and requests, so let me know if there's anything I can do to help.
(One-liners supplied for mnemonic purposes - they do not do justice to the complexities of the topics.)
-
Single Responsibility principle
"Split up your component if it has more than one reason to change"
-
Open/Closed principle
"Let your component be open to extension, but closed for modification"
-
Liskov Substitution principle
"Honor the contract"
-
Interface Segregation principle
"Split up your interfaces if any of its methods won't be implemented"
-
Dependency Inversion principle
"Give your component all the stuff it needs to do its job"
-
Strategy pattern
"Allow for interchangeable algorithm implementations"
-
Factory pattern
"Out-source the creation of your components"
-
Decorator pattern
"Add functionality to existing components"
-
Facade pattern
"Offer a unified front to a complex system"
-
Template Method pattern
"Execute a series of common steps, though still allowing for diversification"
-
Adapter pattern
"Build a bridge, an 'adapter', between components"
-
Composite pattern
"Enable node-leaf-like structures"