The SOLID Principles
In this chapter, we will continue to explore concepts of clean design applied to Python. In particular, we will review the SOLID principles and how to implement them in a Pythonic way. These principles entail a series of good practices to achieve better-quality software. In case some of you aren't aware of what SOLID stands for, here it is:
- S: Single responsibility principle
- O: Open/closed principle
- L: Liskov's substitution principle
- I: Interface segregation principle
- D: Dependency inversion principle
The goals of this chapter are as follows:
- To become acquainted with SOLID principles for software design
- To design software components that follow the single responsibility principle
- To achieve more maintainable code through the open/closed principle
- To implement proper class hierarchies in object-oriented design, by complying with Liskov's substitution principle
- To design...