How amol6863/blood-donor-java-project works
Project Type and Purpose
• This is a Java desktop (thin-client) application built in NetBeans using Swing forms.
• It manages blood-donor registration and authentication, connecting to a MySQL (phpMyAdmin/XAMPP) back-end (and optionally to other file-based stores via UCanAccess/HSQLDB).
File Structure
• Top-level:
• src/ – Java entry points and Swing form classes (Splash, LogIn, LogIn2, NewForm, about, loading, Bloodmain).
• dist/ – Packaged JAR and bundled library JARs (MySQL-connector, UCanAccess, HSQLDB, commons-lang, jcalendar, etc.).
• build/ & nbproject/ – NetBeans build scripts (build.xml, project properties, auto-generated classes, .form metadata).
• signup_table.sql – Database schema for the “donors” table.
• In src/, each .form/.java pair represents one UI screen.
• In dist/lib/, each third-party JAR supports either JDBC connectivity or UI enhancement.
Extract Architecture Insights from the README
• Confirms MySQL (phpMyAdmin) as the primary back-end.
• Mentions additional Java libraries to be imported for missing dependencies.
• No explicit layering or service-oriented components mentioned, implying a simple layered desktop architecture: UI → Business Logic → Data Access.
Main Components
a. UI Layer
• Swing forms: Splash → LogIn/LogIn2 → NewForm → about → loading.
• Entry point: Bloodmain.java (initializes the UI sequence).
b. Business Logic Layer
• Controllers embedded in form classes or in Bloodmain.
• Input validation, session management.
c. Data Access Layer
• JDBC drivers (MySQL-connector, UCanAccess, HSQLDB).
• DAOs or inline JDBC calls inside forms or helper classes.
d. External Persistence
• MySQL database (running under XAMPP/phpMyAdmin).
• Optional local file-based DB: Access (via UCanAccess) or HSQLDB.
e. Build & Deployment
• Ant build (build.xml) → dist/BloodDonation.jar + dependencies in dist/lib.
• Packaging for distribution.
Relationships and Data Flows
• User clicks a button on a Swing form → form controller constructs SQL → JDBC driver sends query → MySQL returns result → form updates UI.
• Splash screen shows on startup, then hands off to LogIn → upon successful auth transitions to NewForm (registration) or next screen.
• About & loading forms invoked as modal dialogs.
• Build process: source → Ant → classes → JAR + libs.
Architectural Patterns and Principles
• Layered architecture:
• Presentation (Swing) → Business Logic → Data Access → Database.
• Single‐process, client-server model (desktop client connecting over TCP to local/remote MySQL).
• Use of external libraries for UI layout (AbsoluteLayout, JGoodies) and calendar input (JCalendar).