How danieibazgc/sistema_hotelero works
Project type and purpose
• Hotel DG is a full-stack web application (Java EE) for hotel management.
• It supports reservation management, room occupancy, billing, customer records, inventory and reporting, using a layered architecture and a relational database.
File structure
• Top-level artifacts:
• pom.xml (Maven build)
• apache-tomcat zip (deployment target)
• dbHotel.zip (database script)
• src/main/java:
• Controlador (Servlet layer / Controllers)
• DAO (Data Access Objects)
• Interfaces (DAO interfaces)
• Modelo (Domain-model POJOs)
• librerias (third-party JARs: MySQL driver, iText, Apache POI, Jakarta EE)
• src/main/resources: persistence.xml (JPA config)
• src/main/webapp:
• JSPs and static assets (CSS, JS, images)
• Excel and PDF view generators (.jsp files)
• WEB-INF (beans.xml, web.xml)
README
• Confirms Java (NetBeans), MySQL, layered architecture.
• Describes core modules: reservations, rooms, clients, billing, reporting.
Main components & interactions
a. Presentation tier (Web layer)
• JSP pages, static assets (JS/CSS), Excel/PDF JSP generators.
• Lives in Tomcat’s web container.
b. Controller layer
• CategoriahabitacionServlet, ClienteServlet, HabitacionServlet, etc.
• Receives HTTP requests, interacts with DAOs, sets attributes, forwards to JSPs.
c. Service/DAO layer
• DAO classes implement CRUD operations via JDBC or JPA (persistence.xml).
• Interfaces (IUsuarioDAO) define contracts.
d. Domain model
• POJOs: Cliente, Habitacion, Producto, Registroalojamiento, Usuario, etc.
e. Database
• MySQL schema (dbHotel.sql).
• Persistence managed via JDBC/DataSource configured in context.xml.
f. External libraries
• iText for PDF, Apache POI for Excel exports, Jakarta EE API, jCalendar, other JS plugins.
Architectural patterns & principles
• Layered (presentation → controller → DAO → database)
• MVC: JSP = view, Servlets = controller, Model = domain objects.
• Dependency inversion via DAO interfaces.
• Build & deploy via Maven to Tomcat.
Detail level
• DAO interfaces and implementations.
• Persistence.xml/DataSource configuration as the bridge between DAO layer and DB.
• Static assets and JSP generators under the Presentation tier.