How tyler-liquornik/canoe-analysis works
Main Architectural Layers
• Presentation/UI Layer
• Application/Business Logic Layer
• Domain/Model Layer
• Infrastructure & Cross-Cutting Concerns
Layer and Create Its Sublayers
A. Presentation/UI Layer
• Overview: Handles user interface rendering, FXML-based views, window and scene management.
• Sublayers:
• View Layer: Contains FXML files for different views (e.g., main-view.fxml, beam-view.fxml, hull-builder-view.fxml, etc.) and associated CSS resources.
• Controller Layer: Includes all the Java controllers (e.g., MainController, BeamController, HullBuilderController, etc.) that manage user events and bind them with the underlying business logic.
B. Application/Business Logic Layer
• Overview: Contains the specific services and processes that implement the analysis and design functionality.
• Sublayers:
• Facade/Controller Interaction Sub-Layer: This acts as the interface between the controllers and the module services, ensuring that UI commands are translated into business operations.
C. Domain/Model Layer
• Overview: Represents core business entities, mathematical models, and engineering computations.
• Sublayers:
• Data Models Sub-Layer: Contains the “models” package that features classes such as Canoe, Hull, Load, Equation, etc.
• Functional Models Sub-Layer: Includes implementations of functions for analysis (e.g., CubicBezierFunction, BoundUnivariateFunction) and representation of functions carrying the calculus/engineering algorithms.
• AOP & Cross-Cutting Concerns Sub-Layer: Encapsulates aspects defined in the “aop” package, such as logging (TracingAspect), debouncing actions (DebounceAspect/Debouncer), and other behavioral modifications that are applied across multiple modules.
D. Infrastructure & Utility Layer
• Overview: Contains all lower-level utilities, configuration resources, and deployment scripts.
• Sublayers:
• Configuration & Resource Management: This involves resource files (YAML configurations, logback.xml), font and image resources, and settings used by the application.
• Utility Sub-Layer: Groups utility classes (CalculusUtils, GraphicsUtils, ControlUtils, etc.) that support both business logic and UI rendering.
• Deployment & Build Integration: Scripts and configuration files like pom.xml, deploy-mac.sh, deploy-pc.bat, Maven wrapper files that help in building and deploying the application.
• External Integrations: Any interfaces or APIs (like the mentioned image analysis API for the Percent Open Area Module) can be diagramed as external systems that interact with the application via specific service interfaces.
Relationships & Interactions
• From the Presentation Layer (controllers) to the Application Layer (module services) when users trigger actions (like solving a load case).
• From the Application Layer to the Domain Layer where data models are computed and updated.
• Callouts from the Domain Layer to the Utility Layer (e.g., utilities for calculation) and back to the Business Services layer.
• Bi-directional or cascading calls where AOP uses cross-layer concerns (e.g., logging aspects that wrap around business service calls).
Technologies, Frameworks & Design Patterns
• JavaFX (for UI and FXML-based views)
• Maven (for build management)
• AOP (for cross-cutting concerns like debouncing and tracing)
• MVC / MVVM-inspired separation: FXML views (view), Java controllers (controller), service classes and models (model)
• Domain-Driven Design aspects for modeling civil engineering concepts and calculations