How estebanrodez/outil-gestion-gvem works
Project Overview & Purpose
• The project is a Java desktop/application oriented tool designed to import CSV files (exported from an existing website), process and validate data (such as for expositions, conférenciers, visites, etc.), and generate statistical reports.
• It supports both manual file import (for an initial user) and subsequent network-based (cryptographically secured) data exchange among museum computers.
• Key functions include CSV import/export, data validation, cryptographic security (using classes like DiffieHellman and Vigenere), PDF generation, and an MVC-based UI built with JavaFX (FXML files).
Analyzing the File Structure
• The project is clearly organized following an MVC pattern. Top-level “src” contains subdirectories like:
• application (with further subdivisions into controller, modele, vue, and utilitaire), which maps directly to the MVC structure.
• The “vue” folder contains all the FXML UI files and associated CSS for presentation.
• The “controleur” folder holds controllers that mediate between the UI and business logic.
• The “modele” folder contains the domain models (e.g. Client, Conferencier, Exposition, Visite).
• The “utilitaire” folder includes helper classes for CSV management, file system management, cryptographic functions, PDF generation, etc.
• There are extensive test directories (src/test) that mirror the main components (models, utilities) for ensuring reliable functionality.
• The “ressources” folder contains CSV test files outlining various valid and invalid cases, which emphasizes the data validation aspect of the system.
Main Components to be Represented
a. User Interface Layer:
• JavaFX-based views (FXML and CSS files).
• Managed by the controllers (e.g., AccueilControleur, MenuImportationControleur, etc.) to interact with user actions.
b. Controller Layer:
• The controllers are responsible for interpreting UI events and orchestrating calls to the business logic.
• Manage tasks such as triggering CSV imports/exports, initiating network transfer operations, and handling report generation.
c. Business Logic & Data Processing:
• Models that represent the domain objects (Conferencier, Exposition, Visite, etc.).
• Utility classes handling CSV import/export (ImportationCSV, ExportationCSV), validation, file/CSV management (GestionCSV, GestionFichiers), and data processing (TraitementDonnees).
• Report generation and statistical data calculations, with classes managing different views of the data (e.g., moyenne, ensemble, et filtres).
d. Cryptography & Network Components:
• Security functionality via the Diffie-Hellman exchange (EchangeDiffieHellman) and Vigenere algorithms for data encryption.
• Network modules that facilitate secure remote imports (ImporterDistantControleur) ensuring that data exchanged over the museum network is encrypted.
e. Persistence/File System Integration:
• Interaction with CSV files (reading, writing, validation) and file system management.
• Temporary file storage, error handling via custom exceptions like FichierDonneesInvalidesException et al.
Relationships & Data Flow
• Data Flow: User actions in the UI trigger controllers which then invoke data import/export via the utilitaire classes. Data is parsed and then passed to the model layer. After processing, reports are generated (possibly via GenererPdf) and displayed/updated in the UI.
• The network module acts as an intermediary when multiple users are involved, where controllers manage secure file transmission using cryptographic protocols.
• Testing artifacts (as seen in src/test) validate individual components and ensure functional integrity across different layers.
Key Architectural Patterns & Guiding Principles
• MVC (Model-View-Controller): Clearly separates concerns between the UI, control logic, and business (domain) model.
• Layered Architecture: The system is divided into the presentation layer (vue), application logic (controleur and modele), and utility components (utilitaire).
• Separation of data processing and security: Data import, encryption, and export are handled by distinct utility classes.
• Emphasis on validation: Extensive CSV test cases indicate robust validation logic.
Technologies, Frameworks, and Libraries
• Java programming language and JavaFX for the UI (FXML, CSS).
• CSV file management and custom exception handling for robust data validation.
• In-house cryptography (Diffie-Hellman, Vigenere) rather than relying on external cryptography libraries.
• PDF generation utilities for report production.
• Standard Java testing frameworks are implied by the detailed tests in the src/test package.