How marcoman2/employeemanagementsystem works
Project Type and Purpose
• This is a standalone JavaFX desktop application (“Employee Management System”) built with NetBeans and Ant.
• It provides a login screen, a dashboard with charts/reports, and CRUD operations against a relational database (MySQL or Oracle).
Key Artifacts from File Structure
• Top‑level
• README.md – one‑line project description.
• build.xml / nbproject/ – Ant build scripts and NetBeans metadata.
• Source (employeeManagementSystem/src)
• FXML files: FXMLDocument.fxml (login UI), dashboard.fxml (main dashboard UI).
• Controllers: FXMLDocumentController.java, dashboardController.java.
• Data layer: database.java (DB connection manager), getData.java (queries), employeeData.java (model).
• UI styling: dashboardDesign.css, loginDesign.css.
• Build Output (employeeManagementSystem/build)
• Compiled classes & copied resources.
• Distribution (employeeManagementSystem/dist)
• employeeManagementSystem.jar + JNLP + HTML wrapper (WebStart).
• /lib: external libraries (fontawesomefx, jfreechart, mysql‑connector, ojdbc).
Main Components
a. Presentation Layer
• Login Screen (FXMLDocument.fxml + loginDesign.css)
• Dashboard Screen (dashboard.fxml + dashboardDesign.css + JFreeChart)
b. Controller Layer
• FXMLDocumentController (handles login events)
• dashboardController (loads data, populates charts/tables)
c. Data Access Layer
• database.java (connection factory)
• getData.java (SQL execution)
• employeeData.java (POJO for employee records)
d. Database(s)
• MySQL Server
• Oracle DB (optional)
e. External Libraries
• jfreechart (charting)
• JDBC drivers (mysql‑connector, ojdbc)
f. Build & Distribution
• Ant build (build.xml) → compile & package → JAR + JNLP/WebStart
Relationships and Data Flow
• User interacts with UI → event sent to appropriate Controller → Controller invokes Data Access → Data Access opens JDBC Connection → queries DB → maps results into employeeData objects → returns to Controller → Controller updates the UI (tables/charts).
• At build time: source + resources → Ant → compiled classes → packaged with dependencies → deployed as .jar/.jnlp.
Architectural Patterns & Principles
• MVC‑style separation: FXML (View) / Controller / Model (employeeData)
• DAO‑like Data Access layer (database.java + getData.java)
• Externalization of UI layout (FXML) and styling (CSS)
• Single‑process desktop app connecting directly to DB over JDBC