Skip to content

About

A full Java ecosystem built around the minimalist S language: from a core emulator, through rich JavaFX tools, to a multi‑user server and modern Web client.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

🧪 S‑Emulator – Multi‑Stage Java Project

A full Java ecosystem built around the minimalist S language: from a core emulator, through rich JavaFX tools, to a multi‑user server and modern Web client.

Java JavaFX React Vite


📖 Overview

This repository contains four main stages (course exercises), each adding a new architectural layer on top of the previous one. The project simulates an execution environment for the S Language, evolving from a console application to a distributed web system.


📂 Repository Structure & Stages

🔹 Stage 1: Engine & Console (exercise1-engine-console)

Core S Emulator & Console Interface

Implements the execution engine including variables, labels, program model, and flow control.

  • Core Logic: XML programs are parsed, validated, and translated into instruction objects (Increase, Decrease, Jumps, Assignments, Quote, etc.).
  • Console UI: Wraps the engine to expose operations: load, display, expand, execute, and statistics.

🔹 Stage 2: Desktop GUI (exercise2-javafx)

JavaFX GUI & Local Debugger

Builds a visual layer on top of the core engine to make S programs interactive.

  • MVC Architecture: Controllers (AppController, InstructionsController, DebuggerExecutionController) coordinate the view and logic.
  • Features:
    • Step‑by‑step debugging & breakpoints.
    • Instruction highlighting.
    • Theming via ThemeManager & animations via AnimationManager.
📸 Screenshots (Click to expand)
  • image
  • image
  • image

🔹 Stage 3: Multi‑User Server (exercise3-server-client)

Servlet Backend & Remote JavaFX Client

Transforms the emulator into a multi-user system where users can log in, upload programs, and debug remotely.

Server Side (Java Servlets)

  • Managers: UserManager, ExecutionSessionManager, ProgramManager.
  • Endpoints: LoginServlet, UploadServlet, ExecuteServlet, DebugServlet.
  • Infrastructure: Uses ServletUtils and CORSFilter for shared context and access control.

Client Side (JavaFX)

  • UI Components: DashboardController, ExecuteScreenController, LoginController.
  • Networking: Uses a DTO layer (UserData, LoginResponse, ProgramDTO) to communicate with the server.
📸 Screenshots (Click to expand)
  • image
  • image
  • image

🔹 Stage 4: Web Client (exercise4-webclient)

React + Vite Frontend

A modern Single Page Application (SPA) consuming the existing HTTP API.

  • Tech Stack: React, Vite (main.jsx, App.jsx).
  • Key Screens:
    • LoginScreen.jsx – User bootstrap.
    • DashboardScreen.jsx – Program management.
    • ExecutionScreen.jsx – Live execution visualization.
  • Integration: HttpClientUtil and CookieManager handle API calls and session persistence.
📸 Screenshots (Click to expand)
  • image
  • image
  • image

🧱 Core Concepts

Across all exercises, the following architectural principles are maintained:

  1. Single Core Engine: All clients (Console, JavaFX Desktop, Web) share the exact same instruction set and execution pipeline.
  2. Synthetic vs. Base Instructions: High-level constructs (macros) are compiled down to a minimal base instruction set.
  3. DTO‑Driven APIs: Internal models remain encapsulated. External communication happens strictly via Data Transfer Objects (DTOs).
  4. Observability: Execution history, statistics, and credit usage are explicitly tracked for debugging and analysis.

About

A full Java ecosystem built around the minimalist S language: from a core emulator, through rich JavaFX tools, to a multi‑user server and modern Web client.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages