How marogon2003/hotel_alura works
Main Components
• User Interface Layer: Represented by the “views” package which contains classes like Login, MenuPrincipal, RegistroHuesped, ReservasView, etc. These are the GUI screens where users interact.
• Controller Layer: Located in the “controller” package. Controllers are responsible for handling input from the UI, managing user requests (e.g., HuespedController, ReservaController, UsuarioController) and orchestrating actions.
• Data Access Layer (DAO): In the “DAO” package. This layer includes classes (HuespedDAO, ReservaDAO) that encapsulate database interactions.
• Domain/Model Layer: The “modelo” package contains entity definitions (Huesped, Reserva, Usuario) that represent the business objects.
• Factory/Utility Layer: The “factory” package, which includes the ConnectionFactory class (and testConexion), providing database connection abstractions.
• External Resources & Configuration: Although not explicitly disposed as a separate service, the pom.xml and Maven settings indicate dependency management and build configuration.
• Database: Although not hosted in the project tree, the README mentions MySQL, which forms an external yet critical component.
Relationships and Data Flow
• Controllers then use DAO classes to retrieve or persist data, which is represented as model objects.
• The ConnectionFactory serves as a helper for the DAO classes to create database connections to MySQL.
• Dependency directions: for instance, views depend on controllers; controllers depend on DAOs and models; DAOs depend on utilities (ConnectionFactory).
Architectural Patterns & Technologies
• MVC Pattern: Separate the concerns between the presentation (views), the business logic (controllers), and the data model (DAO and model classes).
• Use of a Factory Pattern: The ConnectionFactory indicates the use of a factory pattern for creating database connections.
• Java Ecosystem: Technologies include core Java, Eclipse IDE, Maven (as indicated by pom.xml) for dependency and build management, and external libraries like JCalendar.