How jhackisneros/examen_3 works
Project type and purpose
• This is a Python-based, desktop library‐management application (an academic “examen_3” project).
• It provides CRUD-style operations over books, users, and loans, storing data in CSV files and offering a GUI for interaction.
File structure
• Top-level modules:
• base_datos: CSV read/write abstraction (csv_manager.py)
• catalogo: domain classes for books and genres (book.py, book_genre.py)
• usuarios: domain classes for user types (usuario.py, empleado.py)
• prestamos: business logic for loans (gestor_prestamos.py)
• interfaz: GUI forms and main window (ventana_principal.py, formulario_*.py)
• main.py: application entry point
• Data folder “datos” and root CSV files: persistent storage for books, users, and loans
• requirements.txt: lists external dependencies (e.g., tkinter, standard library)
Review README for architecture hints
• No network or external services—purely local
a. Main components:
• UI Layer: “interfaz” package (forms, main window)
• Application Logic:
• Prestamos Manager (gestor_prestamos.py)
• Catalog domain (book, book_genre)
• User domain (usuario, empleado)
• Data Access Layer: base_datos.csv_manager
• Persistence: CSV files in “datos” and root directory
b. Relationships & interactions:
• UI Layer → invokes methods on Application Logic classes
• Application Logic → uses Data Access Layer to read/write CSVs
• Data Access Layer → directly reads/writes CSV files
• Domain classes act as DTOs carried between layers
c. Architectural patterns & principles:
• MVC-ish separation:
• Model: catalogo, usuarios, prestamos domain classes
• View: interfaz forms
• Controller: gestor_prestamos, main.py glue code
• Single Responsibility: each module handles one aspect (CSV I/O, business rules, UI)
d. Key technologies & libraries:
• Python 3.x (OOP)
• CSV module (built-in) via base_datos.csv_manager
• GUI: likely tkinter (in interfaz)
• No external DB—file-based persistence