Mejoras en entidades - K3001 - Vecchio Kiara#11
Open
KiaraDVecchio wants to merge 1 commit intodds-utn:mainfrom
Open
Mejoras en entidades - K3001 - Vecchio Kiara#11KiaraDVecchio wants to merge 1 commit intodds-utn:mainfrom
KiaraDVecchio wants to merge 1 commit intodds-utn:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mejoras propuestas
Modelado de la entidad
Ciudad:Cree una clase
Ciudadque encapsulanombre,regiónypaísAhora
Climacontiene un objetoCiudaden lugar de unStringpara mayor claridad y extensibilidad.Justificación
Ciudadencapsula la lógica y los datos geográficos, separando esta responsabilidad de la claseClima, que se enfoca más en lo meteorológico.Creación de
CondicionAlerta:La evaluación de alertas se implementó en una nueva clase para encapsular los valores de alerta de la humedad y temperatura.
Se eliminó el método
cumpleCondicionesAlerta()deAlertasService.Justificación:
CondicionAlertase encarga de una única cosa, decidir si hay condiciones extremas.AlertasService, simplemente cambiando la implementación deCondicionAlerta.Creación de la clase
Alerta:Esta clase se usa en una situación climática extrema que requiere notificación.
Se encarga de generar un mensaje de alerta y construir un
Email.Justificación:
Clima) de la acción de notificación (Email).AlertasServicesepa cómo se construye el mensaje.Actualización de
ClimaService:Se adaptó para trabajar con múltiples ciudades obtenidas desde
application.properties(ciudades.argentina).Se modificó la lógica para instanciar correctamente
Ciudada partir delWeatherResponse.Justificación:
Modificación del
AlertasService:Se delegó la lógica a
CondicionAlertayAlerta.Justificación:
AlertasServiceahora solo coordina y no contiene lógica de negocio.Refactor de
Email.java:Apliqué el patrón Adapter mediante la interfaz
IEmailAdapter.Se agregó un método
configurarAdapter(...)y se desacopló el métodoenviar().Justificación:
Emailsolo sabe delegar el envío.Creación de DTOs para
Email:Agregué los DTOs
EmailInputDTOyEmailOutputDTO.Justificación: