3. What is SOLID?
Single Responsibility Principle
Open Closed Principle
Liskov Substitution Principle
Interface Segregation Principle
Dependency Inversion Principle
4. Why SOLID?
S.O.L.I.D. is a collection of best-
practice, object-oriented design
principles which can be applied to
your design, allowing you to
accomplish various desirable goals
such as loose-coupling, higher
maintainability
11. Liskov Substitution Principle
You should be able to use any derived
class in place of a parent class and have
it behave in the same manner without
modification. It ensures that a derived
class does not affect the behavior of the
parent class, i.e. that a derived class
must be substitutable for its base class.
16. Dependency Inversion Principle
A. HIGH LEVEL MODULES SHOULD NOT
DEPEND UPON LOW LEVEL MODULES.
BOTH SHOULD DEPEND UPON
ABSTRACTIONS
B. ABSTRACTIONS SHOULD NOT DEPEND
UPON DETAILS. DETAILS SHOULD DEPEND
UPON ABSTRACTIONS
17.
18. Bad designs and poor code is not good
because it's hard to change. Bad designs are:
- Rigid (change affects too many parts of
the system)
- Fragile (every change breaks something
unexpected)
- Immobile (impossible to reuse)