SlideShare una empresa de Scribd logo
1 de 25
MAD · NOV 22-23 · 2019
MAD · NOV 22-23 · 2019
Principios SOLID
Aplicados en Javascript gracias a Typescript
Leonardo Micheloni
Developer.
MAD · NOV 22-23 · 2019
Hola!
■ Leonardo Micheloni
■ Slides y código de ejemplo: @leomicheloni
MAD · NOV 22-23 · 2019
■ Conocer
■ Comprender
MAD · NOV 22-23 · 2019
Disclaimer
MAD · NOV 22-23 · 2019
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
MAD · NOV 22-23 · 2019
■ Escalabilidad.
■ Rigidez.
■ Matenibilidad.
■ Evolución.
■ Reutilización.
MAD · NOV 22-23 · 2019
■ Single responsibility principle.
■ Open close principle.
■ Liskov sustitution principle.
■ Interface segregation principle.
■ Dependency inversión principle.
MAD · NOV 22-23 · 2019
MAD · NOV 22-23 · 2019
■ Tipificación fuerte.
■ POO.
■ Miembros estáticos.
■ Permite generar ES3.
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
MAD · NOV 22-23 · 2019
Single responsibility principle
MAD · NOV 22-23 · 2019
Open / Close principle
"Software entities ... should be open for extension, but closed for
modification."
■ Classes.
■ Modules.
■ Functions.
Bertrand Meyer
MAD · NOV 22-23 · 2019
Open / Close principle
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
MAD · NOV 22-23 · 2019
Liskov sustitution principle
MAD · NOV 22-23 · 2019
Interface segregation principle
"Many client-specific interfaces are better than one general-purpose interface.“
Robert Martin
MAD · NOV 22-23 · 2019
Interface segregation principle
MAD · NOV 22-23 · 2019
Dependency inversion principle
One should depend upon abstractions, not concretions.
Robert Martin
MAD · NOV 22-23 · 2019
Dependency inversion principle
MAD · NOV 22-23 · 2019
Let’s some code!
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
MAD · NOV 22-23 · 2019
Gracias!
MAD · NOV 22-23 · 2019

Más contenido relacionado

Más de Leonardo Micheloni

Más de Leonardo Micheloni (9)

Docker for losers
Docker for losersDocker for losers
Docker for losers
 
Clean code javascript + live coding
Clean code javascript + live codingClean code javascript + live coding
Clean code javascript + live coding
 
Un viaje por Cosmos DB
Un viaje por Cosmos DBUn viaje por Cosmos DB
Un viaje por Cosmos DB
 
Cosmos db gab2018
Cosmos db gab2018Cosmos db gab2018
Cosmos db gab2018
 
Cosmos DB in a nutshell
Cosmos DB in a nutshellCosmos DB in a nutshell
Cosmos DB in a nutshell
 
Esp8266 iothub Azure data analysis in real time
Esp8266 iothub Azure data analysis in real timeEsp8266 iothub Azure data analysis in real time
Esp8266 iothub Azure data analysis in real time
 
Clean code javascript
Clean code javascriptClean code javascript
Clean code javascript
 
Tdd y pair programming
Tdd y pair programmingTdd y pair programming
Tdd y pair programming
 
Blockchain, smart contracts y azure
Blockchain, smart contracts y azureBlockchain, smart contracts y azure
Blockchain, smart contracts y azure
 

2019 commit solid typescript

  • 1. MAD · NOV 22-23 · 2019
  • 2. MAD · NOV 22-23 · 2019 Principios SOLID Aplicados en Javascript gracias a Typescript Leonardo Micheloni Developer.
  • 3. MAD · NOV 22-23 · 2019 Hola! ■ Leonardo Micheloni ■ Slides y código de ejemplo: @leomicheloni
  • 4. MAD · NOV 22-23 · 2019 ■ Conocer ■ Comprender
  • 5. MAD · NOV 22-23 · 2019 Disclaimer
  • 6. MAD · NOV 22-23 · 2019
  • 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
  • 8. MAD · NOV 22-23 · 2019 ■ Escalabilidad. ■ Rigidez. ■ Matenibilidad. ■ Evolución. ■ Reutilización.
  • 9. MAD · NOV 22-23 · 2019 ■ Single responsibility principle. ■ Open close principle. ■ Liskov sustitution principle. ■ Interface segregation principle. ■ Dependency inversión principle.
  • 10. MAD · NOV 22-23 · 2019
  • 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
  • 15. MAD · NOV 22-23 · 2019 Open / Close principle
  • 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
  • 22. MAD · NOV 22-23 · 2019 Let’s some code!
  • 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
  • 24. MAD · NOV 22-23 · 2019 Gracias!
  • 25. MAD · NOV 22-23 · 2019

Notas del editor

  1. ddddd
  2. ddddd
  3. ddddd
  4. ssss