7. MAD · NOV 22-23 · 2019
SOLID
■ Algo que se pregunta en las entrevistas.
■ Acrónimo.
■ Conjunto de principios.
■ Pensado para POO.
■ Se relacionado con la agilidad
Robert Martin
11. MAD · NOV 22-23 · 2019
■ Tipificación fuerte.
■ POO.
■ Miembros estáticos.
■ Permite generar ES3.
12. MAD · NOV 22-23 · 2019
Single responsibility principle
“A class should have only a single responsibility, that is, only changes to one
part of the software's specification should be able to affect the specification of
the class”.
Robert Martin, Tom DeMarco
13. MAD · NOV 22-23 · 2019
Single responsibility principle
14. MAD · NOV 22-23 · 2019
Open / Close principle
"Software entities ... should be open for extension, but closed for
modification."
■ Classes.
■ Modules.
■ Functions.
Bertrand Meyer
16. MAD · NOV 22-23 · 2019
Liskov sustitution principle
"Objects in a program should be replaceable with instances of their subtypes
without altering the correctness of that program.“
Barbara Liskov
17. MAD · NOV 22-23 · 2019
Liskov sustitution principle
18. MAD · NOV 22-23 · 2019
Interface segregation principle
"Many client-specific interfaces are better than one general-purpose interface.“
Robert Martin
19. MAD · NOV 22-23 · 2019
Interface segregation principle
20. MAD · NOV 22-23 · 2019
Dependency inversion principle
One should depend upon abstractions, not concretions.
Robert Martin
21. MAD · NOV 22-23 · 2019
Dependency inversion principle
23. MAD · NOV 22-23 · 2019
Final thoughts
■ ¿Podemos usarlos siempre?
■ ¿Tengo que ser Messi para usarlo?
■ ¿Se puede trasladar a todo?
■ Más cosas para ver
∘ KISS
∘ YAGNI
∘ DRY
∘ CLEAN CODE