Publication:
Aplicación de Clean Architecture a la gestión de la logística de exámenes en la Universidad

Loading...
Thumbnail Image
Official URL
Full text at PDC
Publication Date
2021
Advisors (or tutors)
Editors
Journal Title
Journal ISSN
Volume Title
Publisher
Citations
Google Scholar
Research Projects
Organizational Units
Journal Issue
Abstract
En la actualidad, las facultades de la Universidad Complutense de Madrid tienen una necesidad vital de actualizar la gestión de exámenes. Este proyecto subsana todas las necesidades creando un sistema de gestión de exámenes digitalizado evitando la gran carga que supone a los profesores una organización manual. Los puntos más importantes solventados son: Organización y optimización del calendario de exámenes para reducir su franja de tiempo. Gestionar las reservas de aulas dando cabida al mayor número de exámenes por día. Ubicación estratégica de alumnos en aulas para evitar la copia entre ellos. Imprimir y almacenar bajo estimación los exámenes. Transporte de exámenes con sus correspondientes riesgos. Todas estas funcionalidades son solo una pequeña muestra de las necesidades encontradas inicialmente. Todo evoluciona con el tiempo y se tiene que adaptar, los proyectos fracasan porque se hacen ad hoc a unas especificaciones iniciales. Esto hace que a largo plazo queden obsoletos e inmantenibles. El potencial de este proyecto no es solo que cubre las necesidades antes nombradas sino el know-how que asegura una alta progresión a futuro. Para lograr esta versatilidad se ha seguido los principios SOLID, creando una arquitectura robusta que podrá soportar cualquier evolución. Además, una gran ventaja competitiva es que la base del proyecto puede reutilizarse como estructura para otros proyectos con un fin distinto al actual. La arquitectura del proyecto esta influenciada por el enfoque de Clean Architecture de Robert C. Martin evolucionada con Hexagonal Architecture de Alistair Cockburn,que se basan en Domain-Driven Design. Todo ello obliga a tener un desacople entre capas por responsabilidades y mantener una alta cohesión dentro de ellas. Las capas utilizadas, de la parte más core de la aplicación a la más externa, son Enterprise Business Rules, Application Business Rules, Interface adapters y Frameworks & Drivers. Las capas de negocio Enterprise Business Rules y Application Business Rules definen todas la lógica de negocio como las entidades y sus caso de uso. En este dominio se debe definir y desarrollar toda la funcionalidad de negocio tales como los algoritmos que planificarán el calendario de exámenes, optimización de uso de aulas y distribución inteligente del alumnado en ellas. A su vez definirá, mediante contratos de interfaz, cómo han de comunicarse los módulos externos con el núcleo y que deben de implementar, lo que en Hexagonal Architecture se llama puertos. Estos agentes externos pueden ser la persistencia de datos (BBDD), la comunicación HTTP y servicios externos como la validación del alumno mediante el carnet universitario. Estas implementaciones o adaptaciones de puerto se realizarán en la capa Interface adapters, que servirá de mediador entre nuestro dominio de negocio y todo lo ajeno a él. Uno de los focos más importantes implementados en el proyecto ha tratado la independencia con el lugar de persistencia de datos, es decir, la base de datos. Como dijo Robert C. Martin "The database is a detail. Why do we have databases?" explicando su evolución desde las tarjetas perforadas hasta la posibilidad de la desaparición de las base de datos relacionales en pro de hashtables o trees debido a la creciente velocidad de lectura de los hardware de persistencias. Esto se ha logrado mediante un simple DAO[44] en la capa de dominio y el uso de un ORM en las capas Interface adapters y Frameworks & Drivers, soportando PostgreSQL, MySQL, MariaDB, SQLite y MSSQL solo cambiando un único parámetro de código. La lógica de negocio implementada puede ser consumida desde una página web, una aplicación móvil nativa o una aplicación de escritorio, satisfaciendo las futuras necesidades de dispositivos donde haya de ser usada. Esto aporta una gran escalabilidad y una gran proyección de futuro para añadir funcionalidades a demanda sin cambiar el core de la aplicación. Esta tenaz independencia, sumada a los principios SOLID, realizada de forma rigurosa permitirá que haya un continuo crecimiento y una fácil evolución según necesidades. Sin olvidar que presenta un precedente a seguir para futuros proyectos pudiendo seguir su estudiada arquitectura para otros fines.
At present, the faculties of the Complutense University of Madrid have a vital need to update the management of exams. This project solves all the needs by creating a digitized exam management system avoiding the great burden that manual organization implies for teachers. The most important points resolved are: Organization and optimization of the exam calendar to reduce your time frame. Manage classroom reservations accommodating the largest number of exams per day. Strategic placement of students in classrooms to avoid copying between them. Print and store exams under estimate. Transporte de exámenes con sus correspondientes riesgos. All these features are just a small sample of the needs initially found. Everything evolves over time and it has to be adapted, projects fail because they are made ad hoc to initial specifications. This makes them obsolete and unsustainable in the long term. The potential of this project is not only that it meets the needs mentioned above, but also the know-how that ensures high progression in the future. To achieve this versatility, SOLID principles have been followed, creating a robust architecture that can withstand any evolution. In addition, a great competitive advantage is that the project base can be reused as a structure for other projects with a diferent purpose than the current one. The architecture of the project is influenced by the Clean Architecture approach by Robert C. Martin evolved with Hexagonal Architecture by Alistair Cockburn, which are based on Domain-Driven Design. All this forces to have a decoupling between layers due to responsibilities and to maintain high cohesion within them. The layers used, from the most core part of the application to the most external, are Enterprise Business Rules, Application Business Rules, Interface adapters and Frameworks & Drivers. The Enterprise Business Rules and Application Business Rules business layers define all business logic such as entities and their use cases. In this domain, all business functionality must be defined and developed, such as the algorithms that will plan the exam calendar, optimization of the use of classrooms and intelligent distribution of students in them. At the same time, it will define, by means of interface contracts, how the external modules must communicate with the kernel and what they must implement, what in Hexagonal Architecture is called ports. These external agents can be data persistence (BBDD), HTTP communication and external services such as the validation of the student through the university card. These implementations or port adaptations will be carried out in the Interface adapters layer, which will act as a mediator between our business domain and everything outside it. One of the most important focuses implemented in the project has dealt with independence with the place of data persistence, that is, the database. As Robert C. Martin said "The database is a detail. Why do we have databases?" explaining its evolution from punch cards to the possibility of the disappearance of relational databases in favor of hashtables or trees due to increasing read speed of persistence hardware. This has been achieved through a simple DAO in the domain layer and the use of an ORM in the Interface adapters and Frameworks & Drivers layers, supporting PostgreSQL, MySQL, MariaDB, SQLite and MSSQL only by changing a single parameter of code. The implemented business logic can be consumed from a web page, a native mobile application or a desktop application, satisfying the future needs of the devices where it is to be used. This provides great scalability and a great future projection to add functionalities on demand without changing the core of the application. This tenacious independence, added to the principles of open / closed and Liskov substitution, carried out in a rigorous way, will allow for continuous growth and easy evolution according to needs. Without forgetting that it presents a precedent to follow for future projects, being able to continue its studied architecture for other purposes. The implemented business logic can be consumed from a web page, a native mobile application or a desktop application, satisfying the future needs of the devices where it is to be used. This provides great scalability and a great future projection to add functionalities on demand without changing the core of the application. This tenacious independence, added to the SOLID principles, carried out in a rigorous way, will allow for continuous growth and easy evolution according to needs. Without forgetting that it presents a precedent to follow for future projects, being able to follow its studied architecture for other purposes.
Description
Trabajo de Fin de Grado en Ingeniería de computadores, Facultad de Informática UCM, Departamento de Sistemas Informáticos y Computación, Curso 2020/2021
Unesco subjects
Keywords
Citation