How mrsalifdiallo/gestionbancairejavafx works
Project Type and Purpose
• This is a JavaFX desktop application designed for managing banking operations such as handling clients, bank cards, transactions, and loyalty programs.
• It follows a typical layered architecture with a strong separation between the user interface (views), business logic, and persistence/data layers using JPA/Hibernate with PostgreSQL.
File Structure
• The project is Maven-based with a clear division between source code (src/main/java) and resources (src/main/resources).
• Notice the packages:
• "com/groupeisi/gestionbancaires/entities": Contains JPA entity classes.
• "com/groupeisi/gestionbancaires/views": Contains JavaFX controller classes that interact with FXML view files.
• "com/groupeisi/gestionbancaires/services": Provides service-level components (e.g., ClientService) which encapsulate business logic.
• "com/groupeisi/gestionbancaires/utils" and "JpaUtils.java": Utility classes for JPA/Hibernate configuration and possibly helper methods.
• Resources include FXML files for UI layouts, CSS for styling, and configuration files such as persistence.xml (for database settings) and hibernate.cfg.xml.
Insights from the README
• The README emphasizes key functionalities: client management, bank card management, transaction tracking, and loyalty programs.
• It lists out the technologies employed: JavaFX for UI, JPA/Hibernate for persistence, PostgreSQL for the backend database, and Maven for dependency management.
• There’s a clear separation between the view (FXML files, controllers) and the backend logic (entities, services, utilities).
a. Main Components:
• User Interface (UI): JavaFX-based interface using FXML files and styled by CSS.
• Presentation/Controller Layer: Contains JavaFX controllers (e.g., LoginViewController, MainViewController, etc.) found in both application/view and com/groupeisi/gestionbancaires/views packages.
• Business Logic / Service Layer: Includes service classes (e.g., ClientService) and other business logic components.
• Data Access Layer: JPA entity classes (such as Client, CarteBancaire, Transaction, etc.) and utility classes (JpaUtils, HibernateUtil) that manage interactions with the persistence context.
• Database: External PostgreSQL database that is configured via persistence.xml and hibernate.cfg.xml.
b. Relationships and Interactions:
• The UI layer interacts with the Presentation/Controller layer: user events (e.g., button clicks) trigger controller methods.
• Controllers invoke services in the Business Logic layer to process requests.
• The Business Logic layer uses the Data Access layer (JPA/Hibernate utilities and entities) to retrieve, update, or store data.
c. Architectural Patterns and Design Principles:
• MVC (Model-View-Controller): The separation between FXML views, controllers in the views packages, and Models (JPA entity classes) is evident.
• Layered Architecture: Clear separation of concerns (UI, business logic, persistence).
• Dependency Injection (if used): Although not explicitly shown, Maven dependencies and use of JPA/Hibernate often rely on DI principles.
d. Technologies, Frameworks, and Libraries:
• JavaFX for the UI.
• JPA/Hibernate for ORM.
• PostgreSQL as the backend database.
• Maven for build and dependency management.
• Lombok is mentioned as a tool to reduce boilerplate in the code (likely applied in the entities or model classes).