How itzsaad09/office-and-class-allocation-system works
Project Type and Purpose
• This is a monolithic, desktop‐based Java application (built with NetBeans/Ant) that manages office and class allocation (users, courses, classes, offices).
• The UI is constructed with Java Swing (.form + .java files), and persistence is handled via a local SQL database (project.sql).
High-Level Architecture Layers
a. Presentation Layer
• Java Swing forms (SignUp.form/.java, LogIn.form/.java, AdminPage.form/.java, etc.)
• Handles user input, navigation between screens, and displays results or error dialogs.
b. Business Logic Layer
• UI controllers contain the core validation and orchestration logic (e.g., SignUpSuccessful.java invokes Database.registerUser()).
• Central Database.java class encapsulates all JDBC calls (connect, CRUD operations).
c. Data Access Layer
• Database.java opens JDBC connections, prepares SQL statements, executes queries against the RDBMS.
• project.sql defines the schema (tables for users, classes, offices, registrations).
d. Database
• A relational database server (MySQL, PostgreSQL, or similar) running locally or on LAN.
Core Components and Their Interactions
• User Action → Swing UI Form → invokes Business Logic in the same class or helper → calls Database.java → executes SQL → returns results/errors → UI displays outcome.
• Build & Deployment → Ant (build.xml) compiles src/, bundles classes, and creates an executable JAR or runs from NetBeans.
Architectural Patterns & Principles
• Layered Pattern: clear separation between UI, business logic, and data access.
• Single-process, single-tier desktop application (no microservices or remote APIs).
• JDBC for database abstraction.
Detailed Elements
• Build artifact (JAR) output from Ant, and NetBeans metadata (nbproject/) as ancillary.