How eriquito00/proyectoaplicacionescalada works
Project Type and Purpose
• This is a Java-based, console (CLI) application for managing climbing schools, routes, and users using a MySQL database.
• It follows a three-tier (MVC-style) architecture with a DAO layer for database access and uses Docker to provision the MySQL instance.
Main Components
a. User Interface (View)
• src/view/View.java
• Presents menus, reads user input, displays results.
b. Controller Layer
• Entry point: src/controller/Main.java
• Menu classes: src/controller/menus/MenuClasses.java, MenuAvanzados.java
• CRUD handlers in src/controller/classes/{create, read, update, delete}
• Routes user commands to the DAO layer.
c. Model Layer
• Domain classes: src/model/classes/{Escalador, Escola, Sector, Via}
• Connection manager: src/model/connection/MySQLConnection.java (JDBC setup)
• DAO interfaces: src/model/dao/interfaces/*.java
• DAO implementations: src/model/dao/MySQLDAO/MySQLEscaladorDAO.java, etc.
d. Database
• MySQL container defined in docker-compose.yml
• Initialization scripts in docker/{bd-inicial.sql, data-inicial.sql, advanced-query.sql}
e. Build & Runtime
• Maven (pom.xml) for dependencies and build lifecycle
• Docker for database provisioning
Relationships and Data Flow
• User → View: types command in console
• View → Controller: relays menu selection and parameters
• Controller → DAO interface: invokes create(), read(), update(), delete() or advanced queries
• DAO impl → MySQLConnection: obtains JDBC Connection
• Connection → MySQL container: executes SQL, returns ResultSet
• Results propagate back up: DAO → Controller → View → User
Architectural Patterns & Principles
• Layered (Separation of Concerns): View / Controller / Model / DAO
• DAO Pattern: isolates SQL logic behind interfaces
• JDBC Connection Pooling or single‐connection abstraction in MySQLConnection
• Containerization: database as disposable service
a. Layout
• Layers vertically or horizontally:
[CLI View] → [Controller Package] → [DAO Layer (Interfaces + Impl)] → [MySQLConnection] → [MySQL DB Container]
• Rectangles for Java components (View, Controller, DAO)
• Blue = Application code
• Green = Database services
• Orange = Build & deployment tools
d. Annotations
• Next to the DB container, list initialization scripts (bd-inicial.sql, etc.)
• Near the DAO layer, note “Implements EscaladorDAO, EscolaDAO, …”
• By the Controller, note “Menus & CRUD handlers”