How miguelangelalmanza/agenciaviajes works
Main Components
• Presentation Layer:
• Components: LoginVista, RegistroVista, PaqueteVista, ComparacionVista.
• Role: Handles the user interface and user interactions.
• Controller Layer:
• Components: LoginControlador, RegistroControlador, PaquetebControlador.
• Role: Processes user inputs, controls the application's workflow, and mediates between the view and the model.
• Business / Model Layer:
• Components: Usuario, UsuarioDAO, Paquetebasico, etc.
• Role: Manages the core data (representing travel packages and users) and contains the data logic.
• Database Layer:
• Components: ConexionDB and consultas.sql.
• Role: Handles database connectivity, executes queries, and manages data storage.
• Application Bootstrapping:
• Component: Main.java.
• Role: Acts as the entry point and initializes the overall system.
Relationships and Interactions
• Data Flow:
• User interactions initiate from the Vista layer, e.g., LoginVista triggers an event that is captured by LoginControlador.
• The controller then uses the Model layer (using classes like UsuarioDAO) to fetch or store required data.
• The Model interacts with the Database layer (via ConexionDB and using consultas.sql for SQL queries) for persistent storage.
• Results move back from the Model to the Controller and on to the View to update the UI.
• Dependency Flow:
• The Controller depends on both the View (for user inputs) and the Model (for data operations).
• The Model depends on the Database layer.
• The Main entry point initializes these layers and may handle configuration and startup processes.
Architectural Patterns and Technologies
• Architectural Pattern: MVC (Model-View-Controller) is clearly in use, with clear separation between presentation, business logic, and data management.
• Technologies:
• Java is the core programming language.
• Maven is used as the project management and build tool (pom.xml).
• Design Principles: Separation of concerns, modularity, and maintainability are evident in the package structure.