EWUmate Lite — JavaFX Desktop Companion
Object Oriented Programming Course Project (ICE107). A lightweight JavaFX desktop companion for East West University students natively interacting with the Supabase backend. Implements strict OOP design patterns, inheritance hierarchies, and event schedule mapping.
Architectural Pipeline & Data Flow
JavaFX 21 & FXML Client
Clean desktop GUI with SceneBuilder XML layouts and CSS3 themes
Advising Schedule Clash Engine
TimeSlot overlap validator and credit hour tuition forecasting
Supabase REST DAO & JSON Cache
Asynchronous HTTP CompletableFuture pipelines and local fallback
Engineering EWUmate Lite: Applying Gang-of-Four Design Patterns in Java 17 and JavaFX
Author: Md. Rakibul Hasan (@rxxeron)
Academic Affiliation: B.Sc. in Information and Communications Engineering (ICE), Dept. of Computer Science and Engineering, East West University
Course: ICE107 — Object Oriented Programming
Core Concepts: OOP Principles (Encapsulation, Polymorphism, Inheritance), GoF Patterns (MVC, DAO, Singleton, Observer)
1. Academic Scope & Motivation
During university lab examinations, programming contests, and advising periods in campus computer clusters, students are frequently prohibited from using smartphones. Furthermore, university lab machines (running Windows 10/11 x64 with strict domain group policies) cannot run heavy Android emulators.
For ICE107: Object Oriented Programming, I built EWUmate Lite: an ultra-lightweight, standalone Java desktop companion. It demonstrates rigorous software engineering principles, zero-dependency native packaging, and seamless interoperability with the live Supabase cloud database used by the mobile platform.
text+--------------------------------------------------------------------------------------------------+ | EWUMATE LITE ARCHITECTURE (JAVA 17) | +--------------------------------------------------------------------------------------------------+ | | | [PRESENTATION TIER (JavaFX 21 + FXML)] | | ├── Declarative SceneBuilder XML Layouts (*.fxml) styled with Modular CSS3 | | ├── Decoupled Controller Layer (DashboardController, RoutineController, CGPAController) | | └── JavaFX ObservableList & SimpleDoubleProperty Data Binding | | │ | | ▼ | | [SERVICE & BUSINESS DOMAIN TIER] | | ├── ScheduleConflictValidator (Encapsulated TimeSlot Overlap Logic) | | ├── CGPAEngine (Cumulative Grade Point Average Forecast Strategy) | | └── EventBus Mediator (Decoupled Inter-Controller Communication) | | │ | | ▼ | | [DATA ACCESS TIER (DAO Pattern)] | | ├── SupabaseRestClient (Thread-Safe Singleton HttpClient using CompletableFuture) | | └── Local JSON Fallback Cache (Offline Storage when Campus Proxy restricts REST APIs) | | | +--------------------------------------------------------------------------------------------------+
2. Gang-of-Four (GoF) Design Patterns Implemented
A. Model-View-Controller (MVC) Pattern
- View: Pure FXML documents describing component hierarchies, styled with custom dark-mode CSS sheets.
- Controller: Implements JavaFX
Initializableinterfaces. Handles user events (clicks, advising basket updates) and delegates work to background services. - Model: Immutable domain POJOs (
Course,Section,TimeSlot,GradeRecord) with strict encapsulation and getter/setter access controls.
B. Data Access Object (DAO) & Singleton Pattern
To prevent redundant HTTP socket creation, the cloud communication engine is structured as a thread-safe Singleton DAO:
javapublic class SupabaseRestClient { private static volatile SupabaseRestClient instance; private final HttpClient httpClient; private SupabaseRestClient() { this.httpClient = HttpClient.newBuilder() .version(HttpClient.Version.HTTP_2) .connectTimeout(Duration.ofSeconds(10)) .build(); } public static SupabaseRestClient getInstance() { if (instance == null) { synchronized (SupabaseRestClient.class) { if (instance == null) { instance = new SupabaseRestClient(); } } } return instance; } public CompletableFuture<List<Course>> fetchDepartmentCoursesAsync(String department) { HttpRequest request = HttpRequest.newBuilder() .uri(URI.create(SUPABASE_URL + "/rest/v1/courses?dept=eq." + department)) .header("apikey", SUPABASE_KEY) .GET() .build(); return httpClient.sendAsync(request, HttpResponse.BodyHandlers.ofString()) .thenApply(HttpResponse::body) .thenApply(JsonParser::parseCourseList); } }
C. Observer Pattern via JavaFX Property Bindings
As courses are added to the tentative advising schedule, the total enrolled credit count, tuition fee estimate, and schedule conflict alert badge update automatically through JavaFX reactive property bindings:
totalCreditsProperty.bind(Bindings.createDoubleBinding(() -> basket.stream().mapToDouble(Course::getCredits).sum(), basket));
3. Engineering Decisions & Packaging
- Build Pipeline: Managed via Apache Maven with automated
maven-shade-pluginfat-JAR compilation. - Platform Independence: Runs seamlessly across Windows x64, macOS, and Ubuntu Linux lab workstations.
- Memory Footprint: Operates under 85MB of RAM, making it significantly faster and lighter than Electron-based alternatives.