2. We are going to talk about
• What is S.O.L.I.D. ?
• S - Single responsibility principle
• O - Open/closed principle
• L - Liskov substitution principle
• I - Interface segregation principle
• D - Dependency inversion principle
• Conclusion
3. What is S.O.L.I.D. ?
Five design principles intended to make software designs more
understandable, promoted by Robert C. Martin, aka Uncle Bob.
4. S - Single responsibility principle
A class should only have one reason to change.
5. O - Open closed principle
Entities should be open for extension but should be closed for
modification.
6. L - Liskov substitution principle
Let q(x) be a property provable about objects x of type T. Then q(y)
should be provable for objects y of type S where Sis a subtype of T.
7. I - Interface segregation principle
No client should be forced to implement methods which it does not
use.
8. D - Dependency invertion principle
Higher level modules should be coupled with the lower level
modules with complete abstraction.
9. Conclusion
• Think S.O.L.I.D. from the beginning buuuuut no need to
overcomplicate.
• KISS + S.O.L.I.D. it’s a good idea.