How ayesa14/proyecto-programacion works
Main Components
• Controller Layer: Contains multiple controllers organized under “src/controller”. Note the clear separation between administration controllers (like CambioPass, MenuAdministracion) and order system controllers (under “src/controller/sistema_pedidos” with subdivisions for new orders, adding items, and finalizing orders).
• Model Layer: All business and data-related logic resides in “src/model”. This includes database connectivity (as seen in DatabaseConnectionService.java) and model classes for different functionalities (administration, orders, etc.).
• View Layer: The user interfaces are defined in “src/view” and are built with Swing. They have corresponding packages mirroring the controller structure.
• Database Component: The Oracle Database is external and is integrated via the “ojdbc6.jar” library (found in the "lib" directory) along with database configuration properties in “src/model/database_config.properties”.
Relationships and Interactions
• MVC Data Flow:
• The User interacts with the View (Swing UI) → the View passes the request to the Controller.
• The Controller processes the request, interacts with the Model to retrieve or update business data and then instructs the View to update accordingly.
• The Model communicates with the Oracle Database (using ojdbc6.jar and configuration details provided) to fetch or persist data.
• Specific Paths: Distinguish the administration flow versus the typical order system flow. For example, administration actions (e.g., changing passwords, managing products/mesas, viewing order history) are handled by a distinct set of controllers, models, and views.
• External Data Flow: Highlight the connections between the Model classes (like DatabaseConnectionService.java) and the Oracle Database, indicating the reliance on the provided scripts for table creation and data insertion.
Architectural Patterns & Design Principles
• The Model handles data and business rules.
• The View deals with the graphical representation (Swing components).
• The Controller serves as the mediator between Model and View.
• Modularization: Emphasize the sub-categorization (e.g., ‘administracion’ and ‘sistema_pedidos’) which improves maintainability and separation of functionality.
• Dependency Management: Include the external dependency to Oracle (via ojdbc6.jar) and configuration files like “database_config.properties”.
• Labels: Clearly mark each component with names (e.g., “InicioController”, “GestionProductosModel”, “AddComandaView”) where necessary to reflect their category or function.
• External Dependencies: Mark the Oracle Database and include a note indicating that Oracle’s ojdbc6.jar library enables connectivity.