From 3a734b84705ccb8174e9cf24b74d7a3c3b2c1beb Mon Sep 17 00:00:00 2001 From: Kostya Date: Sun, 11 Oct 2026 19:28:04 +0300 Subject: ui-fx: move the JavaFX UI into a module that sees only the api Exercise 3 asks for a new desktop client that reuses the Exercise 2 screens, and the course asks that clients depend on the DTO contract, never on the engine. ui-desktop mixed both: its views and controllers only talk to the api interfaces, but AppView and AppState each had a convenience constructor that built a ServiceEngine, which tied every UI class to the service module. Move the screens, controllers, components, FXML, skins and fonts into a new ui-fx module that depends on api alone. Packages are unchanged, so FXML controller names and resource paths keep working as they are. ui-desktop keeps only the Exercise 2 app: Launcher, App, which now builds the ServiceEngine and passes its contexts in, and ServiceEngine itself. The Exercise 3 client can then reuse ui-fx with remote contexts and never put the engine on its classpath. The build proves the split: ui-fx compiles with nothing but api visible. Tests move with the code they cover. AppStateTest drives the real engine, so it stays in ui-desktop. --- tools/_util.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tools/_util.sh') diff --git a/tools/_util.sh b/tools/_util.sh index 3a29ecb..7351e62 100644 --- a/tools/_util.sh +++ b/tools/_util.sh @@ -5,13 +5,14 @@ case "$(uname -s)" in *) SEP=":" ;; esac -MODULES="api service server ui-console ui-desktop" +MODULES="api service server ui-fx ui-console ui-desktop" DEPS_api="" DEPS_service="api" DEPS_server="api service" DEPS_ui_console="api service" -DEPS_ui_desktop="api service" +DEPS_ui_fx="api" +DEPS_ui_desktop="api service ui-fx" RUNTIME_LIB_DIRS="pico jaxb gson openjfx" -- cgit v1.2.3