Skip to content

Instantly share code, notes, and snippets.

@jrichardsz
Last active October 15, 2015 17:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrichardsz/99f9e9e253fd5a43bd0f to your computer and use it in GitHub Desktop.
Save jrichardsz/99f9e9e253fd5a43bd0f to your computer and use it in GitHub Desktop.
Inflexible System Example
class Producto {
method1()
method2()
method3()
submit() {
genericSubmit()
}
}
Llega un requerimiento en el que se debe enviar la info del
producto a un sistema interno o externo antes del submit().
Se tiene que modificar el codigo fuente de Producto
class Producto {
method1()
method2()
method3()
submit() {
sendDataToExternalInternalSystem()
genericSubmit()
}
}
Llega otro requerimiento parecido.
Nueva modificacion, y asi sucesivamente
class Producto {
method1()
method2()
method3()
submit() {
sendDataToExternalInternalSystem()
otherProcess()
otherFix()
....
genericSubmit()
}
}
Resultado : Deuda Tecnologica T_T
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment