The aim of this repository is to provide a coaching material about SOLID.
Though this examples should be used from «students» itself, they are tailor-made to an agile technical mentoring approach.
The repo is made using C# language on dotnet 6+.
The main
branch intentionally contains a dirty code, that is not respecting any of the SOLID principles.
The steps/*
branches contains the refactored code, each step has the explanation and an example of a SOLID principle.
Steps are subsequent: step 2 starts from step 1 and so on.
steps/01_SRP
contains the code refactored to fulfill the Single Responsibility Principlesteps/02_OCP
contains thesteps/01
code, but with the Open-Closed Principle implemented- ...
- last step contains the fully refactored code, respecting all SOLID principles
As the steps
are sequential, an edit to the previous branch should be merged to the next step:
There's a resource that excellently give a lot of readings that can be used to learn and understand SOLID principles: Wikipedia.
Some other strong recommended readings:
- Robert C. Martin sheets:
- Robert C. Martin books:
- Agile Software Development, Principles, Patterns, and Practices (ISBN 978-0135974445)
- Clean Code: A Handbook of Agile Software Craftsmanship (ISBN 978-0132350884)
- Clean Architecture: A Craftsman's Guide to Software Structure and Design (ISBN 9780134494166)