SlideShare una empresa de Scribd logo
1 de 15
Descargar para leer sin conexión
C a m p u s P a r t y 2 0 1 4
TALLER DE REFACTORIZACIÓN
Carla Suárez @carlast22
María Gómez @mariascandella
!
REFACTORIZACIÓN
!
▫︎Técnica de cambio de código.
▫︎Se altera la estructura interna del módulo
pero no su comportamiento externo
▫︎Se usa para limpiar el código y mejorar su
estructura
2
HABILIDADES PARA DESARROLLAR
▫︎Uso de buenas prácticas
(principio SOLID)
▫︎Trabajar de forma
incremental
▫︎TDD (desarrollo guiado
por pruebas)
▫︎Buen diseño de casos de
pruebas
▫︎Programación en parejas
3
SOLID
▫︎Single Responsibility Principle
▫︎Open/Closed Principle
▫︎Liskov Substitution Principle
▫︎Interface Segregation Principle
▫︎Dependency Inversion Principle
4
SOLID
▫︎Single Responsibility Principle
5
“Un módulo debe tener una sola razón para cambiar”
SOLID
▫︎Open/Closed Principle
6
“Módulos deben estar abiertos a extensiones pero cerrados a
modificaciones”
SOLID
▫︎Liskov Substitution Principle
7
“Cada clase que hereda de otra puede usarse como su padre
sin necesidad de conocer las diferencias entre ellas. ”
SOLID
▫︎Interface Segregation Principle
8
“Ningún cliente debería ser forzado a depender de métodos
que no usa”
SOLID
▫︎Dependency Inversion Principle
9
“Módulos deben depender basándose en abstracciones no en
objetos concretos”
TRABAJAR DE FORMA INCREMENTAL
10
Initial
Planning
Planning
Requirements Analysis  &  Design
Implementation
Deployment
Testing
Evaluation
http://en.wikipedia.org/wiki/Iterative_and_incremental_development
PRUEBAS UNITARIAS
▫︎Una forma de
comprobar el correcto
funcionamiento de un
módulo de código.
▫︎Aseguran que el módulo
funciona correctamente
de manera
independiente.
11
EJEMPLO PRUEBA UNITARIA
12
TDD (DESARROLLO GUIADO POR PRUEBAS)
13
RED
GREENREFACTOR
PROGRAMACIÓN EN PAREJAS
▫︎Dos programadores trabajando en la misma
computadora con el mismo código
▫︎Beneficios:
▫︎Mayor calidad
▫︎Mayor productividad
▫︎Menos riesgo de errores
▫︎Modelo ping-pong
14
VAMOS A DESARROLLAR!
▫︎http://tinyurl.com/cpq4TW
15

Más contenido relacionado

Similar a Taller de Refactorización (Campus Party Quito 2014)

Arquitectura de Software Principio Abierto- Cerrado Open/Close
Arquitectura de Software Principio Abierto- Cerrado Open/CloseArquitectura de Software Principio Abierto- Cerrado Open/Close
Arquitectura de Software Principio Abierto- Cerrado Open/CloseErnesto Maya
 
¿A qué huele tu código? Afinando nuestro olfato
¿A qué huele tu código? Afinando nuestro olfato¿A qué huele tu código? Afinando nuestro olfato
¿A qué huele tu código? Afinando nuestro olfatoRubén Bernárdez
 
Jyoc java-cap08 principios poo
Jyoc java-cap08 principios pooJyoc java-cap08 principios poo
Jyoc java-cap08 principios pooJyoc X
 
Buenas practicas desarrollando software
Buenas practicas desarrollando softwareBuenas practicas desarrollando software
Buenas practicas desarrollando softwareGabriel Moral
 

Similar a Taller de Refactorización (Campus Party Quito 2014) (6)

Arquitectura de Software Principio Abierto- Cerrado Open/Close
Arquitectura de Software Principio Abierto- Cerrado Open/CloseArquitectura de Software Principio Abierto- Cerrado Open/Close
Arquitectura de Software Principio Abierto- Cerrado Open/Close
 
SOLID - ¿Cómo lo aplico a mi código?
SOLID - ¿Cómo lo aplico a mi código?SOLID - ¿Cómo lo aplico a mi código?
SOLID - ¿Cómo lo aplico a mi código?
 
SOLID para CatDotNet
SOLID   para CatDotNetSOLID   para CatDotNet
SOLID para CatDotNet
 
¿A qué huele tu código? Afinando nuestro olfato
¿A qué huele tu código? Afinando nuestro olfato¿A qué huele tu código? Afinando nuestro olfato
¿A qué huele tu código? Afinando nuestro olfato
 
Jyoc java-cap08 principios poo
Jyoc java-cap08 principios pooJyoc java-cap08 principios poo
Jyoc java-cap08 principios poo
 
Buenas practicas desarrollando software
Buenas practicas desarrollando softwareBuenas practicas desarrollando software
Buenas practicas desarrollando software
 

Más de Maria Gomez

From Monolith to Observable Microservices using DDD
From Monolith to Observable Microservices using DDDFrom Monolith to Observable Microservices using DDD
From Monolith to Observable Microservices using DDDMaria Gomez
 
CQRS and Event Sourcing: A DevOps perspective
CQRS and Event Sourcing: A DevOps perspectiveCQRS and Event Sourcing: A DevOps perspective
CQRS and Event Sourcing: A DevOps perspectiveMaria Gomez
 
Splitting the monolith using Domain Driven Design
Splitting the monolith using Domain Driven Design Splitting the monolith using Domain Driven Design
Splitting the monolith using Domain Driven Design Maria Gomez
 
Observable Microservices (O'Reilly SACon London 2018)
Observable Microservices (O'Reilly SACon London 2018)Observable Microservices (O'Reilly SACon London 2018)
Observable Microservices (O'Reilly SACon London 2018)Maria Gomez
 
Effective team onboarding
Effective team onboardingEffective team onboarding
Effective team onboardingMaria Gomez
 
Observable microservices (O'Reilly SACon NY 2018)
Observable microservices (O'Reilly SACon NY 2018)Observable microservices (O'Reilly SACon NY 2018)
Observable microservices (O'Reilly SACon NY 2018)Maria Gomez
 
Security in agile teams
Security in agile teamsSecurity in agile teams
Security in agile teamsMaria Gomez
 
Security in agile teams
Security in agile teamsSecurity in agile teams
Security in agile teamsMaria Gomez
 
Project Management - Report
Project Management - ReportProject Management - Report
Project Management - ReportMaria Gomez
 
Principles of New Media - Essay
Principles of New Media - EssayPrinciples of New Media - Essay
Principles of New Media - EssayMaria Gomez
 
Project Management - Risk management
Project Management - Risk managementProject Management - Risk management
Project Management - Risk managementMaria Gomez
 
Responsive Environments - Critical report
Responsive Environments - Critical reportResponsive Environments - Critical report
Responsive Environments - Critical reportMaria Gomez
 
New Media Management - Project plan
New Media Management - Project planNew Media Management - Project plan
New Media Management - Project planMaria Gomez
 
New Media Management - Report
New Media Management - ReportNew Media Management - Report
New Media Management - ReportMaria Gomez
 

Más de Maria Gomez (14)

From Monolith to Observable Microservices using DDD
From Monolith to Observable Microservices using DDDFrom Monolith to Observable Microservices using DDD
From Monolith to Observable Microservices using DDD
 
CQRS and Event Sourcing: A DevOps perspective
CQRS and Event Sourcing: A DevOps perspectiveCQRS and Event Sourcing: A DevOps perspective
CQRS and Event Sourcing: A DevOps perspective
 
Splitting the monolith using Domain Driven Design
Splitting the monolith using Domain Driven Design Splitting the monolith using Domain Driven Design
Splitting the monolith using Domain Driven Design
 
Observable Microservices (O'Reilly SACon London 2018)
Observable Microservices (O'Reilly SACon London 2018)Observable Microservices (O'Reilly SACon London 2018)
Observable Microservices (O'Reilly SACon London 2018)
 
Effective team onboarding
Effective team onboardingEffective team onboarding
Effective team onboarding
 
Observable microservices (O'Reilly SACon NY 2018)
Observable microservices (O'Reilly SACon NY 2018)Observable microservices (O'Reilly SACon NY 2018)
Observable microservices (O'Reilly SACon NY 2018)
 
Security in agile teams
Security in agile teamsSecurity in agile teams
Security in agile teams
 
Security in agile teams
Security in agile teamsSecurity in agile teams
Security in agile teams
 
Project Management - Report
Project Management - ReportProject Management - Report
Project Management - Report
 
Principles of New Media - Essay
Principles of New Media - EssayPrinciples of New Media - Essay
Principles of New Media - Essay
 
Project Management - Risk management
Project Management - Risk managementProject Management - Risk management
Project Management - Risk management
 
Responsive Environments - Critical report
Responsive Environments - Critical reportResponsive Environments - Critical report
Responsive Environments - Critical report
 
New Media Management - Project plan
New Media Management - Project planNew Media Management - Project plan
New Media Management - Project plan
 
New Media Management - Report
New Media Management - ReportNew Media Management - Report
New Media Management - Report
 

Último

La era de la educación digital y sus desafios
La era de la educación digital y sus desafiosLa era de la educación digital y sus desafios
La era de la educación digital y sus desafiosFundación YOD YOD
 
CLASE DE TECNOLOGIA E INFORMATICA PRIMARIA
CLASE  DE TECNOLOGIA E INFORMATICA PRIMARIACLASE  DE TECNOLOGIA E INFORMATICA PRIMARIA
CLASE DE TECNOLOGIA E INFORMATICA PRIMARIAWilbisVega
 
SalmorejoTech 2024 - Spring Boot <3 Testcontainers
SalmorejoTech 2024 - Spring Boot <3 TestcontainersSalmorejoTech 2024 - Spring Boot <3 Testcontainers
SalmorejoTech 2024 - Spring Boot <3 TestcontainersIván López Martín
 
guía de registro de slideshare por Brayan Joseph
guía de registro de slideshare por Brayan Josephguía de registro de slideshare por Brayan Joseph
guía de registro de slideshare por Brayan JosephBRAYANJOSEPHPEREZGOM
 
Hernandez_Hernandez_Practica web de la sesion 12.pptx
Hernandez_Hernandez_Practica web de la sesion 12.pptxHernandez_Hernandez_Practica web de la sesion 12.pptx
Hernandez_Hernandez_Practica web de la sesion 12.pptxJOSEMANUELHERNANDEZH11
 
PARTES DE UN OSCILOSCOPIO ANALOGICO .pdf
PARTES DE UN OSCILOSCOPIO ANALOGICO .pdfPARTES DE UN OSCILOSCOPIO ANALOGICO .pdf
PARTES DE UN OSCILOSCOPIO ANALOGICO .pdfSergioMendoza354770
 
Instrumentación Hoy_ INTERPRETAR EL DIAGRAMA UNIFILAR GENERAL DE UNA PLANTA I...
Instrumentación Hoy_ INTERPRETAR EL DIAGRAMA UNIFILAR GENERAL DE UNA PLANTA I...Instrumentación Hoy_ INTERPRETAR EL DIAGRAMA UNIFILAR GENERAL DE UNA PLANTA I...
Instrumentación Hoy_ INTERPRETAR EL DIAGRAMA UNIFILAR GENERAL DE UNA PLANTA I...AlanCedillo9
 
ATAJOS DE WINDOWS. Los diferentes atajos para utilizar en windows y ser más e...
ATAJOS DE WINDOWS. Los diferentes atajos para utilizar en windows y ser más e...ATAJOS DE WINDOWS. Los diferentes atajos para utilizar en windows y ser más e...
ATAJOS DE WINDOWS. Los diferentes atajos para utilizar en windows y ser más e...FacuMeza2
 
KELA Presentacion Costa Rica 2024 - evento Protégeles
KELA Presentacion Costa Rica 2024 - evento ProtégelesKELA Presentacion Costa Rica 2024 - evento Protégeles
KELA Presentacion Costa Rica 2024 - evento ProtégelesFundación YOD YOD
 
Global Azure Lima 2024 - Integración de Datos con Microsoft Fabric
Global Azure Lima 2024 - Integración de Datos con Microsoft FabricGlobal Azure Lima 2024 - Integración de Datos con Microsoft Fabric
Global Azure Lima 2024 - Integración de Datos con Microsoft FabricKeyla Dolores Méndez
 
Cortes-24-de-abril-Tungurahua-3 año 2024
Cortes-24-de-abril-Tungurahua-3 año 2024Cortes-24-de-abril-Tungurahua-3 año 2024
Cortes-24-de-abril-Tungurahua-3 año 2024GiovanniJavierHidalg
 
International Women's Day Sucre 2024 (IWD)
International Women's Day Sucre 2024 (IWD)International Women's Day Sucre 2024 (IWD)
International Women's Day Sucre 2024 (IWD)GDGSucre
 
Proyecto integrador. Las TIC en la sociedad S4.pptx
Proyecto integrador. Las TIC en la sociedad S4.pptxProyecto integrador. Las TIC en la sociedad S4.pptx
Proyecto integrador. Las TIC en la sociedad S4.pptx241521559
 
POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...
POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...
POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...silviayucra2
 
EPA-pdf resultado da prova presencial Uninove
EPA-pdf resultado da prova presencial UninoveEPA-pdf resultado da prova presencial Uninove
EPA-pdf resultado da prova presencial UninoveFagnerLisboa3
 
Trabajo Mas Completo De Excel en clase tecnología
Trabajo Mas Completo De Excel en clase tecnologíaTrabajo Mas Completo De Excel en clase tecnología
Trabajo Mas Completo De Excel en clase tecnologíassuserf18419
 
Plan de aula informatica segundo periodo.docx
Plan de aula informatica segundo periodo.docxPlan de aula informatica segundo periodo.docx
Plan de aula informatica segundo periodo.docxpabonheidy28
 
Redes direccionamiento y subredes ipv4 2024 .pdf
Redes direccionamiento y subredes ipv4 2024 .pdfRedes direccionamiento y subredes ipv4 2024 .pdf
Redes direccionamiento y subredes ipv4 2024 .pdfsoporteupcology
 
trabajotecologiaisabella-240424003133-8f126965.pdf
trabajotecologiaisabella-240424003133-8f126965.pdftrabajotecologiaisabella-240424003133-8f126965.pdf
trabajotecologiaisabella-240424003133-8f126965.pdfIsabellaMontaomurill
 

Último (19)

La era de la educación digital y sus desafios
La era de la educación digital y sus desafiosLa era de la educación digital y sus desafios
La era de la educación digital y sus desafios
 
CLASE DE TECNOLOGIA E INFORMATICA PRIMARIA
CLASE  DE TECNOLOGIA E INFORMATICA PRIMARIACLASE  DE TECNOLOGIA E INFORMATICA PRIMARIA
CLASE DE TECNOLOGIA E INFORMATICA PRIMARIA
 
SalmorejoTech 2024 - Spring Boot <3 Testcontainers
SalmorejoTech 2024 - Spring Boot <3 TestcontainersSalmorejoTech 2024 - Spring Boot <3 Testcontainers
SalmorejoTech 2024 - Spring Boot <3 Testcontainers
 
guía de registro de slideshare por Brayan Joseph
guía de registro de slideshare por Brayan Josephguía de registro de slideshare por Brayan Joseph
guía de registro de slideshare por Brayan Joseph
 
Hernandez_Hernandez_Practica web de la sesion 12.pptx
Hernandez_Hernandez_Practica web de la sesion 12.pptxHernandez_Hernandez_Practica web de la sesion 12.pptx
Hernandez_Hernandez_Practica web de la sesion 12.pptx
 
PARTES DE UN OSCILOSCOPIO ANALOGICO .pdf
PARTES DE UN OSCILOSCOPIO ANALOGICO .pdfPARTES DE UN OSCILOSCOPIO ANALOGICO .pdf
PARTES DE UN OSCILOSCOPIO ANALOGICO .pdf
 
Instrumentación Hoy_ INTERPRETAR EL DIAGRAMA UNIFILAR GENERAL DE UNA PLANTA I...
Instrumentación Hoy_ INTERPRETAR EL DIAGRAMA UNIFILAR GENERAL DE UNA PLANTA I...Instrumentación Hoy_ INTERPRETAR EL DIAGRAMA UNIFILAR GENERAL DE UNA PLANTA I...
Instrumentación Hoy_ INTERPRETAR EL DIAGRAMA UNIFILAR GENERAL DE UNA PLANTA I...
 
ATAJOS DE WINDOWS. Los diferentes atajos para utilizar en windows y ser más e...
ATAJOS DE WINDOWS. Los diferentes atajos para utilizar en windows y ser más e...ATAJOS DE WINDOWS. Los diferentes atajos para utilizar en windows y ser más e...
ATAJOS DE WINDOWS. Los diferentes atajos para utilizar en windows y ser más e...
 
KELA Presentacion Costa Rica 2024 - evento Protégeles
KELA Presentacion Costa Rica 2024 - evento ProtégelesKELA Presentacion Costa Rica 2024 - evento Protégeles
KELA Presentacion Costa Rica 2024 - evento Protégeles
 
Global Azure Lima 2024 - Integración de Datos con Microsoft Fabric
Global Azure Lima 2024 - Integración de Datos con Microsoft FabricGlobal Azure Lima 2024 - Integración de Datos con Microsoft Fabric
Global Azure Lima 2024 - Integración de Datos con Microsoft Fabric
 
Cortes-24-de-abril-Tungurahua-3 año 2024
Cortes-24-de-abril-Tungurahua-3 año 2024Cortes-24-de-abril-Tungurahua-3 año 2024
Cortes-24-de-abril-Tungurahua-3 año 2024
 
International Women's Day Sucre 2024 (IWD)
International Women's Day Sucre 2024 (IWD)International Women's Day Sucre 2024 (IWD)
International Women's Day Sucre 2024 (IWD)
 
Proyecto integrador. Las TIC en la sociedad S4.pptx
Proyecto integrador. Las TIC en la sociedad S4.pptxProyecto integrador. Las TIC en la sociedad S4.pptx
Proyecto integrador. Las TIC en la sociedad S4.pptx
 
POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...
POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...
POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...
 
EPA-pdf resultado da prova presencial Uninove
EPA-pdf resultado da prova presencial UninoveEPA-pdf resultado da prova presencial Uninove
EPA-pdf resultado da prova presencial Uninove
 
Trabajo Mas Completo De Excel en clase tecnología
Trabajo Mas Completo De Excel en clase tecnologíaTrabajo Mas Completo De Excel en clase tecnología
Trabajo Mas Completo De Excel en clase tecnología
 
Plan de aula informatica segundo periodo.docx
Plan de aula informatica segundo periodo.docxPlan de aula informatica segundo periodo.docx
Plan de aula informatica segundo periodo.docx
 
Redes direccionamiento y subredes ipv4 2024 .pdf
Redes direccionamiento y subredes ipv4 2024 .pdfRedes direccionamiento y subredes ipv4 2024 .pdf
Redes direccionamiento y subredes ipv4 2024 .pdf
 
trabajotecologiaisabella-240424003133-8f126965.pdf
trabajotecologiaisabella-240424003133-8f126965.pdftrabajotecologiaisabella-240424003133-8f126965.pdf
trabajotecologiaisabella-240424003133-8f126965.pdf
 

Taller de Refactorización (Campus Party Quito 2014)