jmvs

08 Cross-cutting concepts

Concept Approach ADR
Configuration jmvs.properties and elements.properties on the classpath, parsed once into immutable records, validated at startup 0015
Colouring ColourScheme implementations shared by all display modes, surfaces and density contours (zone colouring); colours stored separately from geometry; fixed chain palette 0006, 0007
Units Model and scene coordinates in ångströms (Å); element radii converted from RasMol units (÷ 250) when the table is loaded; no ad-hoc scale factors  
Immutability Structure model and config are immutable; scene data is built once per (structure, mode)  
Threading Render thread owns GL and UI; loading, bonding and scene building run on a background executor and post results with Gdx.app.postRunnable 0005
Error handling Typed exceptions; app boundary shows a dialog and keeps running 0011
Logging System.Logger; summaries at INFO, per-item detail only at TRACE 0011
Resources Shaders and properties loaded from the classpath next to the class that uses them; VisUI skin from its jar  
Shaders GLSL ES 1.0 style, compiled as GLSL 1.50 via libGDX prepend code; one shared two-sided Blinn-Phong fragment shader 0004
Dependency injection Constructor injection, wired in the launcher; no static state or reflection 0006
Testing GPU-free tests for core and scene; golden files from data/ 0012
Security Reads only user-chosen local files; no network; dependency checksums verified 0010
Code style Java 25 idioms; see AGENTS.md 0001