Backend-Frontend Converter: Component-Based Conversion of .NET Computational Models to TypeScript
Organizations: Independent researcher · Georgia Institute of Technology
Abstract
Computational models developed in .NET often need to run locally within web applications. We present Backend--Frontend Converter, an architecture for generating TypeScript implementations of component-based models. The converter maps components, connections, aliases, and formula trees to model-specific TypeScript code. Reusable runtime libraries provide numerical integration, data access, and state handling. We evaluate stored generated implementations through four orbital scenarios and a recorded trading-strategy comparison. Orbital calculations execute in a browser and are paired with C# results by crossing event and timestamp; trading outputs are aligned by date. Analytic scheduler tests and deliberately perturbed outputs assess the validation procedure. Each orbital scenario produces 91 paired events with identical timestamps. Position and velocity differences remain below (10^{-6}\)~km and (10^{-9}\)~km/s. All 20 analytic scheduler checks pass, and the comparator detects each of three prescribed state and time perturbations. The trading comparison contains 501 aligned daily records with matching indicator values, positions, and order events. The evaluated implementations preserve the compared outputs across the C#/TypeScript boundary. Component-specific generation and reusable execution libraries provide a practical route from supported .NET computational models to TypeScript applications.
Figures & tables
| Model role | Source-side requirement | Target-side TypeScript requirement | Validation check |
|---|---|---|---|
| Component | Explicit runtime component | TypeScript component class or interface | Presence and behavior |
| Alias | Stable semantic name | Same alias in TypeScript | State initialization and output access |
| Measurement | Typed value access | Measurement map or interface | Value comparison |
| Processor | Known execution semantics | TypeScript processor implementation | Trajectory or sequence comparison |
| Domain plugin | Known domain behavior | TypeScript plugin implementation | Domain scenario tests |
| Data consumer | Output collection role | TypeScript consumer | Output alignment |
| Source-side concept | Target-side/web concept | Role in migration |
|---|---|---|
| .NET/C# computational model | TypeScript model/runtime classes | Supplies the browser execution realization checked against reference outputs |
| OrbitalForecastCalculator | OrbitalForecast | Generated model components, formulas, configuration, and connections |
| C# Performer | OrbitalForecastCalculation | Developer-supplied execution wrappers |
| Motion-equation aliases such as x , y , z , u , v , w | TypeScript alias values with the same semantic roles | Transfers initial state and exposes calculated variables |
| Data consumer / chart object | TypeScript data consumer object | Collects calculated values during execution |
| Measurements | TypeScript measurement interfaces and maps | Preserve typed access to model variables |
| Notation | Role |
|---|---|
| Cartesian position aliases in the shared coordinate frame | |
| Cartesian velocity aliases in the same frame | |
| Position vector with components x , y , and z at trajectory point | |
| Velocity vector with components u , v , and w at trajectory point | |
| , | Superscripts denoting the server-side C# and client-side TypeScript execution paths |
| Run | ||||||
|---|---|---|---|---|---|---|
| 1 | -5448.34815324 | -4463.93698421 | 0 | -0.985394777432 | 1.21681893834 | 7.45047785592 |
| 2 | -5458.34815324 | -4463.93698421 | 0 | -0.985394777432 | 1.21681893834 | 7.45047785592 |
| 3 | -5458.34815324 | -4453.93698421 | 0 | -0.985394777432 | 1.21681893834 | 7.45047785592 |
| 4 | -5458.34815324 | -4453.93698421 | 0 | -0.985394777432 | 1.21681893834 | 7.45057785592 |
| Start (UTC): 2026-06-24T03:45:06.449; end (UTC): 2026-06-30T09:18:30.449. | ||||||
| Run | Events | Max. pos. diff. | Mean pos. diff. | Max. vel. diff. | Mean vel. diff. |
|---|---|---|---|---|---|
| 1 | 91 | ||||
| 2 | 91 | ||||
| 3 | 91 | ||||
| 4 | 91 |
| Measure | C# | TypeScript | Difference |
| Input scenario | |||
| Symbol | AAPL | AAPL | – |
| Bar interval | 1 day | 1 day | – |
| Historical interval | 2022-01-01 to 2024-01-01 (end exclusive) | – | |
| Aligned daily records | 501 | 501 | 0 |
| Short / long moving-average windows | 10 / 40 | 10 / 40 | – |
Code Translation
Code translation converts programs between languages, frameworks, and representations while aiming to preserve behavior and sometimes improve safety or performance.
See all 40 papers