XF : A Metadata-Driven Runtime Interpreter for Stateless Enterprise Systems
Director, XF Systems Ltd, Malta
sanil@xf.com.mt
This paper introduces xF (the eXtensible Framework), a metadata-centric architectural paradigm designed to mitigate the tight structural coupling inherent in traditional compiled enterprise systems. Whereas conventional Model–View–Controller (MVC) frameworks tightly bind storage, transport, logic, and presentation, the proposed architecture externalises the domain model into a structured Meta-Model interpreted dynamically at runtime. Serving as a unifying descriptive layer—a “Rosetta Stone” for enterprise semantics—the Meta-Model aligns database schemas, transport payloads, business rules, and user interfaces.
By combining principles from Adaptive Object-Models and semantic abstraction within a distributed environment, the work reframes these ideas as the foundation for a fundamentally different class of system: one in which business objects are treated as instances of a generic schema, and where the entire application stack is orchestrated through a single, declarative “language”. The architecture is instantiated in a working system, referred to as xF, which serves as a practical implementation demonstrating the feasibility of this approach.
The core premise of this paper is that such an architecture can deliver the productivity of historical RAD tools while remaining stateless, horizontally scalable, and suitable for modern web deployment.
metadata-driven architecture; model-first persistence; generic object server; interpreter pattern; adaptive object-model; Rosetta Stone architecture; schema-driven UI; stateless systems; semantic layer; runtime interpretation; Auto-DDL; RBAC; FGAC; Unified API
1. Introduction
Enterprise applications have historically been constrained by vertically coupled architectures in which database schemas, transport contracts, business logic, and presentation assets are tightly interdependent. Such coupling produces a predictable cascade of changes across the entire stack, even for minor domain-level adjustments. A routine modification—such as introducing a Taxation Category field within the customer entity—typically necessitates coordinated updates to the database schema, transport-layer contracts, compiled logic tiers, and corresponding user-interface templates.
This architectural rigidity is increasingly misaligned with the demands of contemporary software systems, which require rapid iteration, stateless execution, and horizontal scalability. In response to these challenges, xF adopts a fundamentally different approach: it treats metadata not as passive documentation but as an operational contract that governs runtime behaviour. By elevating the domain model to an executable artifact interpreted dynamically, the architecture seeks to reconcile rapid application development with the requirements of modern, web-native deployment environments.
In contrast to traditional enterprise stacks that embed the business model within compiled code, xF externalises the model as metadata structured within a formally defined Meta-Model. The system functions as a Dynamic Runtime Interpreter of this metadata, using it to:
- generate and synchronise the physical database schema through automated DDL processes,
- shape transport payloads and enforce unified API behaviour,
- drive validation, permissions, and business rules via state-machine constructs, and
- render forms, tables, and workflows within a dynamic user-interface engine.
Through this mechanism, xF operates not merely as another backend or user-interface framework but as a meta-framework for constructing business software. It positions the domain model as a first-class, runtime-interpreted artifact capable of governing the entire application lifecycle.
The working system discussed in this technical paper provides concrete evidence that such an architecture can deliver substantial productivity gains while remaining stateless, horizontally scalable, and suitable for modern web deployment. It serves simultaneously as:
- a reference implementation of the proposed architectural model,
- a practical environment validating the core concepts, and
- a demonstration of a metadata-driven execution system built on the architecture described in this work.
2. Theoretical Background and Related Work
xF synthesises several established paradigms—metadata mapping, adaptive object-models, semantic layers, reflective architectures, and model-first persistence—into a distributed, metadata-driven runtime. While grounded in practical engineering experience, its design is deeply informed by foundational work on dynamic modelling, runtime interpretation, and semantic abstraction.
2.1 Metadata Mapping and Adaptive Object-Models
The architectural roots of xF begin with Fowler’s Metadata Mapping pattern (2002), which advocates externalising structural and behavioural information about domain objects into metadata rather than embedding it in compiled code. This separation enables systems to evolve by modifying descriptive data instead of redeploying software components—a principle echoed throughout research on reflective and metadata-driven architectures.
Yoder and Johnson (2002) expanded this idea into the Adaptive Object-Model (AOM) style, in which classes, attributes, relationships, and even business rules are represented as metadata and interpreted at runtime. AOM systems treat the object model itself as data, enabling immediate domain evolution without recompilation. Subsequent publications on dynamic and model-driven systems frequently position AOMs as suitable for volatile domains, multi-tenant platforms, and environments requiring continuous reconfiguration.
xF advances these concepts for modern, distributed, stateless environments by encoding its adaptive model as transportable JSON Schema dictionaries rather than in-memory object graphs. This aligns with contemporary research on schema-first APIs, microservices, and model-driven engineering, where metadata portability, explicit versioning, and runtime interpretation are essential. By externalising the domain model into structured JSON metadata, xF supports cross-service consistency and runtime configurability while preserving the scalability expected of RESTful architectures.
2.2 The Semantic Layer Lineage
A second conceptual influence is the BusinessObjects Universe semantic layer, a widely adopted innovation of the 1990s that demonstrated how metadata could decouple user-facing query construction from physical database schemas (BusinessObjects, 1995). By enabling users to work with business concepts rather than SQL, the Universe established a practical model for semantic abstraction in enterprise analytics. Industry studies later identified this as an early form of metadata-driven mediation, anticipating developments in semantic integration, ontology-based querying, and model-driven engineering (Smith, 2003; Luján-Mora, 2006).
However, the Universe was fundamentally a read-oriented technology. Analytical workloads avoid many complexities inherent in transactional systems—such as multi-entity validation, aggregate decomposition, state transitions, and error propagation (González, 2011; Pereira, 2014) . xF extends the semantic layer concept into the write lifecycle by using metadata not only to describe data but also to define constraints, workflows, and interaction patterns that govern how data is modified.
This bidirectional interpretation aligns with research in model-driven development, domain-specific languages (DSLs), and adaptive information systems, where metadata is increasingly treated as an executable artifact rather than a passive description (Kelly & Tolvanen, 2008; Atkinson & Kühne, 2017) . It also parallels developments in semantic technologies—knowledge graphs, master data management (MDM), and schema-first API design—where metadata serves as the authoritative source of truth for both structure and behaviour.
In this sense, xF represents an evolution of the semantic layer: from a unidirectional analytics abstraction to a fully bidirectional metadata engine capable of governing both retrieval and transformation of data.
2.3 From Semantic Layers to Executable Metadata
Extending semantic layers into executable behaviour requires rethinking metadata as an operational contract rather than a descriptive artifact. Prior work in model-driven engineering (MDE), reflective architectures, and meta-level systems demonstrates that metadata attains its highest utility when it governs runtime behaviour, enabling systems to adapt and reconfigure without relying solely on static, design-time specifications (Atkinson & Kühne, 2003; France & Rumpe, 2007).
In conventional enterprise architectures, metadata typically manifests as schema definitions, ORM mappings, or analytical models. While these structures influence data representation and retrieval, they rarely determine the execution of transactional logic. Research in dynamic and multi-level modelling suggests that this separation introduces structural rigidity: domain rules, workflows, and validation logic become embedded within imperative codebases, limiting evolvability and complicating long-term maintenance (de Lara & Vangheluwe, 2002; Czarnecki, 2015).
The xF architecture addresses this limitation by elevating metadata to a first-class execution layer. Its Meta-Model specifies entities, relationships, constraints, and permissible state transitions, and this specification is interpreted at runtime across distributed services. This approach aligns with research on adaptive enterprise systems, which emphasise the importance of architectures capable of runtime modification without service disruption (Gronback, 2009; Rutle, 2010).
Within this framework, metadata functions as an executable contract that governs validation, decomposition, invariants, and user-interface construction. This design parallels contemporary low-code and no-code platforms, where metadata-driven engines dynamically generate forms, workflows, and validation logic (Miller, 2018; Hadi, 2020). xF extends these principles to enterprise-grade transactional systems, with an emphasis on correctness, consistency, and horizontal scalability.
As established in the introduction, we present xF using a working system as a practical embodiment of the architectural principles examined here. This approach follows precedents set by foundational industry papers on systems such as MapReduce, Dynamo, Smalltalk, and Erlang.
2.4 Reflective Architectures and Continuation-Passing Style
Reflection (Maes, 1987) and continuation-passing style (CPS) (Reynolds, 1993) provide foundational concepts for systems that treat program structure and control flow as data. xF applies these principles by externalising both state and progression into metadata, allowing each interaction to describe not only the current step of a workflow but also the next computation to perform.
Because the system is fully stateless, the continuation of a workflow cannot reside on the server. Instead, xF returns metadata that encodes the next logical action and the conditions under which the workflow should resume. When the client re-enters the system, the runtime interprets this metadata to continue execution from the correct point. This creates a lightweight form of continuation-passing in which control flow is represented as data rather than as a stack frame.
This mechanism enables what can be understood as temporal recursion: a workflow that progresses through repeated re-entry over time rather than through nested calls. Each step is separated by a temporal gap, yet the system resumes seamlessly because the continuation is encoded in metadata rather than stored in memory. The result is a metadata-driven continuation model that mirrors the essence of CPS while remaining compatible with RESTful constraints and distributed execution.
Determine next step MM-->>XF: Next action + timing XF-->>UI: Return metadata-encoded continuation Note over UI: Wait for specified time
(temporal gap) UI->>XF: Re-enter with same metadata XF->>MM: Resume workflow from continuation MM-->>XF: Next step XF-->>UI: Updated continuation
Figure X. Metadata-driven continuation: control flow encoded as data, enabling temporal recursion in a stateless environment.
2.5 Model-First Persistence and Auto-DDL
Model-driven engineering has long explored generating physical database schemas from conceptual models. Auto-DDL systems such as Hibernate and Entity Framework compare a conceptual model to an existing schema and generate migration scripts. xF extends this approach by making the conceptual model fully externalised metadata. Its Auto-DDL generator interprets the Meta-Model to produce tables, columns, and constraints.
Because the Meta-Model is versioned and transportable, schema evolution becomes a runtime concern rather than a deployment activity, aligning persistence with the same metadata that drives transport and UI.
2.6 Metadata Mapping and the Virtual Active Record
To understand xF’s approach to object modelling, it is useful to contrast it with traditional static class hierarchies. xF constructs domain objects dynamically at runtime—similar in spirit to the Active Record pattern but without requiring static class definitions. This evolution can be understood through three layers.
2.6.1 Layer 1: Metadata Mapping
Fowler’s Metadata Mapping pattern (2002) establishes the principle that object–relational mappings should be defined declaratively rather than hard-coded. A generic interpreter reads the metadata to perform hydration and persistence.
- No hard-coded mapping.
- Declarative, readable metadata.
- Generic interpreter for runtime mapping.
2.6.2 Layer 2: Executable Models
Systems such as Borland’s Enterprise Core Objects (ECO) stored entire domain models as metadata and interpreted them at runtime to generate UI and business logic scaffolding. This lineage includes Naked Objects, Model-Driven Architecture (MDA), and domain-driven UI frameworks. xF positions itself in this tradition by treating the model as the system’s single source of truth.
2.6.3 Layer 3: The Virtual Active Record
Traditional Active Record implementations rely on static coupling between compiled classes and database tables. xF introduces the Virtual Active Record, asking: if the entity is already fully described in metadata, why require a compiled class at all?
At runtime, xF:
- Reads metadata describing fields, relationships, and constraints.
- Constructs an in-memory representation of the entity.
- Attaches generic CRUD and navigation behaviour.
- Exposes the construct as if it were a compiled Active Record class.
There is no static class and no compile-time domain model; the “class” is interpreted entirely at runtime.
2.6.4 Example and Implications
At runtime, xF constructs a dynamic object equivalent to instantiating a Customer class, enabling
operations such as Save() without any compiled domain classes.
- Zero static coupling: Entities can be added or modified without recompilation.
- Generic behaviour: CRUD, validation, and navigation are metadata-driven.
- Model-driven system: The metadata is the single source of truth.
| Feature | Traditional Active Record | xF Virtual Active Record |
|---|---|---|
| Class Definition | Static, handwritten | Generated at runtime |
| Mapping | Hard-coded or attribute-based | Pure metadata |
| Coupling | Strong (Class ↔ Table) | Loose (Metadata ↔ Interpreter) |
| Flexibility | Requires recompilation | Dynamic, metadata-driven |
3. The Rosetta Stone Approach to Architecture
The “Rosetta Stone” approach to software architecture is a metaphor for building a common, unifying mapping between different views of a system. Just as the original Rosetta Stone enabled translations between Egyptian hieroglyphs, Demotic script, and ancient Greek, the xF Meta-Model functions as a shared reference model.
It serves as a unifying substrate across five dimensions:
- Logical Model: Conceptual entities and aggregate structures.
- Physical Storage: Tables and columns generated via Auto-DDL.
- Transport Model: Self-describing JSON payloads.
- UI Representation: Controls, layouts, and validation rules.
- Behavioural Rules: Constraints and workflows.
The Rosetta Stone)) MM -->|Generates| SQL[Physical Storage
Tables & Columns] MM -->|Defines| JSON[Transport Model
Payloads & APIs] MM -->|Dictates| UI[UI Representation
Forms & Controls] MM -->|Enforces| Rules[Business Rules
Validation & Logic] MM -->|Describes| Logical[Logical Model
Entities & Aggregates]
Figure 1. The Rosetta Stone Mapping: Metadata as a unifying substrate across architectural concerns.
Because all these dimensions are mapped to the same metadata language, xF guarantees cross-layer consistency. Changing a concept in the Meta-Model is analogous to updating the Rosetta Stone inscription: every dependent representation can be reinterpreted on the next request without recompilation.
4. The Core xF Architecture
4.1 The Meta-Model Hierarchy
The xF architecture centres on a formalized Meta-Model composed of four primary layers, creating a strict hierarchy of definition:
Figure 2. Meta-Model hierarchy: application, entity, attribute, and control layers.
- Application Metadata: Describes global aspects such as identity, security boundaries, and environment settings.
- Entity Metadata: Encodes the system’s Logical Aggregates (e.g., Customer, Order), specifying identity and relationships.
- Attribute Metadata: Defines individual properties, types, constraints (required, regex), and semantic hints.
- Control Types Metadata: Maps abstract attribute types to concrete UI components (e.g., mapping a Signature attribute to an HTML5 SignaturePad).
4.2 Separation of Concerns via Dual Payloads
To maintain a stateless architecture while supporting rich UIs, xF employs a Dual Payload strategy. Each runtime payload pairs data with metadata:
- The
zSegment (Data): Carries the transactional state and business values. This is the only part persisted to the business tables. - The
ySegment (Metadata): Encodes UI rendering hints, validation rules, layout groups, and control options.
Crucially, xF utilises an Asymmetrical Payload Strategy to optimise performance. While the GET request retrieves both segments to drive the UI interpreter, the POST (write) operation transmits only the z segment.
By stripping the heavy y metadata from the upstream traffic, xF effectively mitigates the "over-posting" of non-transactional state—a common bottleneck in distributed systems that leads to excessive bandwidth consumption and memory overhead. This ensures that the write-path remains lightweight and strictly focused on business data, regardless of the complexity of the UI definition.
4.3 The Unified API and System Architecture
The architecture consists of a Generic Object Server and a Frontend Interpreter, mediated by a Unified REST API.
Figure 3a. xF architecture: frontend interpreter and generic backend mediated by metadata.
4.3.1 Mitigation of Controller Sprawl and the Limits of Query Languages
Traditional enterprise systems invariably suffer from Controller Sprawl, where the complexity of the
domain model is linearly mirrored by an ever-expanding set of API endpoints (e.g., /api/customers,
/api/orders, /api/orders/details). This tight coupling necessitates a rigid vertical change cascade,
where a schema change forces updates across the database, the ORM, the DTOs, the Controller, and the API route definition.
4.3.1.1 The GraphQL Divergence: Bandage vs. Cure
In recent years, technologies like GraphQL have emerged to address the inefficiencies of RESTful controller sprawl. By exposing a single endpoint and allowing clients to request specific data shapes, GraphQL effectively reduces network chatter and decouples the client from fixed server responses.
However, from the perspective of the xF architecture, GraphQL functions primarily as a transport optimisation rather than a semantic unification:
- The Logic Gap: While GraphQL unifies the endpoint, it does not unify the behaviour. Backend developers must still write "Resolvers"—effectively micro-controllers—for every field and relationship, maintaining the code-heavy burden of the backend.
- The Knowledge Gap: GraphQL shifts the burden of domain knowledge to the client. The client must "know" exactly which fields to query and how to structure them. It remains a Query Language, not a Guidance System. It delivers the data requested, but it provides no metadata regarding how that data should be validated, rendered, or mutated.
4.3.1.2 The Uniformity Principle and xF
xF resolves this by implementing a Unified API—a single pair of entrance/exit points that serve the entire domain graph—but goes beyond the query-centric model of GraphQL. Instead of the client asking for specific fields ("Give me name and age"), the client asks for the Entity Concept ("Give me the semantics for 'Customer'").
The server responds with a Dual Payload containing both the data and the metadata instructions required to interpret it.
Figure 3. Comparison of Topology: REST (Linear Sprawl), GraphQL (Transport Unification), and xF (Semantic Unification).
4.3.1.3 Why the Status Quo Persists (The Static Coupling Paradox)
If the Unified API offers such distinct advantages in code reduction, why do state-of-the-art systems continue to rely on explicit controllers and static route definitions? The answer lies in the industry's historical optimisation for Compile-Time Safety over Runtime Adaptability.
- Static Guarantees: Traditional architectures rely on static compilers (Java, C#, TypeScript) to catch contract violations before deployment. Explicit controllers serve as a "treaty" between frontend and backend teams, allowing them to work in isolation.
- The xF Trade-off: xF posits that in rapidly evolving enterprise domains, this rigidity is a liability. By moving the contract from compile-time code to runtime metadata, xF sacrifices static analysis for dynamic evolvability.
The "Magic" of the runtime interpreter eliminates the need for the manual wiring that dominates traditional development, adhering to the Single Responsibility Principle (SRP) at the architectural level: the API handles communication, while the metadata handles intent.
4.3.2 Structural Homogeneity across Diverse Domains
To illustrate the power of this homogeneity, consider three distinct entities from a production Vehicle Booking and Trip Allocation System:
ot_booking, ot_driver, and ot_vehicle. Although their business roles differ vastly,
their interaction via the Unified API is identical.
| Entity | Domain Concern | xF Interaction Pattern | Resulting UI Element |
|---|---|---|---|
ot_booking |
Financial / Transactional | GET /api/xf_get/ot_booking/5421 |
Currency Controls, Pax Counters |
ot_driver |
Human Resources / Compliance | GET /api/xf_get/ot_driver/24 |
PDF Uploader (Licenses), Date Pickers |
ot_vehicle |
Asset Management | GET /api/xf_get/ot_vehicle/23 |
Capacity Stats, Insurance Expiry Alerts |
This homogeneity allows for the Generic Repository Pattern (Evans, 2003) to be exposed directly to the frontend.
The frontend does not "know" about drivers or bookings; it knows how to "render a y segment" and "collect a z segment."
This is a realisation of the Reflection principle in software engineering—where the system's structure is its own data.
4.3.3 API Performance and Statelessness
By consolidating into a Unified API, xF facilitates aggressive server-side caching of the Meta-Model while keeping the business data fully stateless. The API acts as a Higher-Order Function:
This functional approach reduces the likelihood of side-effects common in complex controller hierarchies, leading to systems that are inherently easier to debug and scale horizontally (Bernstein & Newcomer, 2009).
5. Integrated Security: Authorization through Metadata Abstraction
In the xF architecture, security is not an auxiliary layer injected into compiled controllers; rather, it is an emergent property of the metadata graph. By coupling authorization directly to the Meta-Model, the system implements a hierarchical Role-Based Access Control (RBAC) model that naturally extends into Fine-Grained Access Control (FGAC). This approach ensures that security policies are governed by the structural definition of the domain rather than the imperative logic of the application.
5.1 Identity Normalisation and Principals
The identity management subsystem is founded upon a normalised four-table relational schema designed to decouple subjects from their organisational context. This schema comprises:
- Users: The primary principals or individual actors within the system.
- Roles: Abstract functional responsibilities (e.g., Auditor, Clerk) that define a set of permissible operations.
- Groups: Contextual containers that define organisational boundaries or multi-tenant isolation.
- User_Groups: A junction table facilitating many-to-many (n:m) mappings between users and their respective groups, allowing a single principal to inhabit multiple security contexts simultaneously.
5.2 Structural Authorization Mapping
Authorization in xF diverges from traditional implementations that map roles to specific URI endpoints or service methods. Instead, the system maps principals (Users, Roles, or Groups) directly to the Meta-Model components. A central Rights registry associates identity markers with specific metadata nodes:
- Entity-Level Authorization: Governs the CRUD (Create, Read, Update, Delete) lifecycle for a logical aggregate (e.g., the
Customerentity). - Attribute-Level Authorization: Facilitates FGAC by controlling visibility and mutability for individual fields within an entity (e.g., restricting the
Salaryattribute to the HR group).
This mapping ensures that security is an intrinsic property of the data definition. When the Meta-Model is interpreted, authorization constraints are applied as a predicate to all data operations, regardless of the entry point.
Figure 4. The intersection of Identity and Metadata. Rights are mapped to the definition of data, not the code accessing it.
5.3 Enforcement Invariants and Policy Consolidation
The externalisation of security into the metadata layer facilitates the enforcement of Unified Security Invariants. By centralising policy within the Meta-Model, the architecture eliminates the redundancy typically found in MVC systems where permission checks must be manually replicated in both UI logic and API controllers.
- Cross-Layer Enforcement: The Runtime Interpreter utilises the security metadata to prune the
y(metadata) segment of the payload. If a principal lacks "View" rights for an attribute, the metadata required to render that control is omitted from the stream, rendering the field invisible at the UI tier. Simultaneously, the Server Interpreter validates thez(data) segment of incomingPOSTrequests against the same metadata, rejecting or sanitising any unauthorized mutations. - Conflict Resolution via Restrictive Inheritance: To manage principals belonging to overlapping groups, xF employs a Restrictive Inheritance model. Effective permissions are calculated using an intersection logic: if conflicting rights exist across a principal’s group memberships, the system defaults to the most restrictive permission set. This "safety-first" hierarchy minimises the risk of accidental privilege escalation often encountered in additive permission models.
This architecture ensures that organisational structures and compliance requirements are enforced through the same interpretive mechanism that drives the application's behaviour, maintaining a strict correspondence between the domain model and its security posture.
6. Runtime Dynamics: The Interpreter Loop
At runtime, xF follows a cyclical process comprising Hydration, Interpretation, and Decomposition. The following breakdown illustrates why xF behaves like a Virtual Active Record interpreter rather than a traditional ORM or controller-driven system.
6.1 The Virtual Active Record Lifecycle: A Step-by-Step Walkthrough
The interaction is reduced to two primary phases: Hydration (GET) and Command (POST). Each phase is driven by a metadata-aware pipeline that constructs and deconstructs entity instances on the fly.
6.1.1 Phase 1: Hydration (GET) — “Build Virtual Active Record → Serialize → Send to UI”
- Read Entity Metadata: xF loads the definition (fields, types, relationships, constraints, UI hints) from the Meta-Model. This metadata is the schema.
-
Build a Runtime Dictionary: Instead of instantiating a static C# class, xF constructs a dynamic dictionary to represent the entity. For example:
{ "Name": "string", "Email": "string", "CreditLimit": "decimal", "Orders": "collection" }This dictionary is the Virtual Active Record instance. It behaves like an object, but it is not a compiled class; it is interpreted.
- Serialize to JSON: The dictionary is serialized and sent to the UI. The UI receives a pure data contract driven by metadata, not a hard-coded DTO.
6.1.2 Phase 2: Command (POST) — “Deserialize → Validate → Logical Endpoint → Persistence”
- JSON → Dictionary: The UI sends JSON back (e.g.,
{ "Name": "Acme Corp", "CreditLimit": 50000 }). xF deserializes this back into a dictionary. -
Type Checking via Metadata: xF validates the dictionary against the Meta-Model:
- Does
"CreditLimit"match the expected typedecimal? - Is
"Name"required? - Are relationships valid?
- Does
- Send to Logical Endpoints: Once validated, the dictionary is passed to the logical layer (business rules, workflows, computed fields). Code-based processing happens here, but the input remains a dictionary, not a static object.
- Persistence Layer Deconstruction: Finally, the persistence layer reads the metadata again to map dictionary keys to table columns (e.g.,
Dictionary["Name"]→ Columncustomer_name) and performs the insert/update/delete.
In summary, xF dynamically constructs entity instances from metadata, sends them to the UI as JSON, receives them back as dictionaries, validates them using metadata, processes them through logical endpoints, and finally maps them back to database tables — all without ever needing static domain classes.
Figure 5. Runtime sequence: hydration, interpretation, and decomposition.
6.2 Decomposition and Validation State Machine
The Decomposition Engine normalises aggregates from JSON to relational schemas. It operates as a strict state machine where validation (both schema-based and rule-based) gates the commit process.
Figure 6. Server-side decomposition flow and validation gating.
6.3 Polymorphic Command Dispatch
The POST cycle executes a functional pipeline based on self-describing payloads. The payload carries intent via an
xf_f field (function selector) and temporal hints via xf_xt. This supports a Tri-fold Logic Execution Strategy:
- Declarative Validation: Regex, ranges, and relationships enforced by metadata pre-persist.
- Synchronous Interop: Metadata-defined WebHooks for facade-style integration.
- Compiled Code Injection: Reflection-based invocation of strongly-typed assemblies for complex logic (an "Escape Hatch").
Furthermore, experimental extensions support **Just-in-time (JIT) logic compilation**, where C# source is stored in metadata and compiled at runtime via Roslyn, effectively blurring the boundary between configuration and code.
7. Frontend Agnosticism and the Interpreter Pattern
At its core, xF is a strictly Headless Architecture. The system imposes no constraints on the technology used to render the user interface. Whether the consuming client is a React web application, a native iOS app, a CLI tool, or a third-party service, the interaction contract remains identical: strictly typed JSON exchanged via the Unified API.
The backend concerns itself exclusively with the generation of the Dual Payload (Data z + Metadata y)
via a GET request, and the ingestion of a transactional payload via a POST request.
How the client chooses to visualise this payload is an implementation detail completely decoupled from the server.
7.1 The Spectrum of Consumption
While xF is agnostic to the frontend implementation, the richness of the metadata payload enables two distinct architectural patterns for UI development: the Classic Static Binding approach and the Dynamic Runtime Interpreter approach.
7.1.1 Approach A: Classic Static Binding (Bespoke UI)
In this traditional model, developers treat xF simply as a data API. They explicitly author component files
(e.g., CustomerForm.tsx), hard-coding the layout and manually binding specific fields from the
JSON response to UI controls.
- Pros: Allows for pixel-perfect, highly custom consumer-facing experiences where unique branding or interaction models are required.
- Cons: Reintroduces the vertical change cascade. If a field is added to the schema, the developer must manually update the frontend code to display it.
7.1.2 Approach B: The Runtime Interpreter (Recommended)
Alternatively, developers can leverage the y (metadata) segment of the payload to build a
Server-Driven UI (SDUI). In this model, the client application functions not as a collection of
pre-defined screens, but as a generic Runtime Interpreter.
The server response acts as an Abstract Instruction Set, describing the intent of the interface rather than its implementation. The client parses this instruction set and dynamically assembles the interface using a component registry. This allows the UI to evolve instantly in sync with the backend schema without code changes.
7.2 Mechanism of Action: The Dynamic Registry Pattern
To implement the Interpreter pattern in frameworks like React or Vue, xF utilises a Dynamic Registry. This acts as the bridge between the abstract metadata and the concrete DOM elements.
-
Registry Initialization: The application bootstraps with a map linking abstract control IDs
(e.g.,
"date-picker","entity-lookup") to concrete frontend components. -
Payload Resolution: Upon receiving the
GETpayload, the interpreter iterates through the attribute definitions in the metadata. - Dynamic Injection: For each attribute, the interpreter performs a lookup in the registry to instantiate the appropriate component, injecting the metadata properties (label, validation rules, read-only state) as props.
7.3 Comparative Summary of Strategies
| Feature | Classic Static Binding | Runtime Interpreter (xF Pattern) |
|---|---|---|
| Binding Time | Compile-Time: UI structure is fixed in the build artifact. | Run-Time: UI structure is determined by the API response. |
| Control Logic | Imperative: <Input value={data.name} /> |
Declarative: {"control": "text-input", "bind": "name"} |
| Change Velocity | Low: Schema changes require frontend code updates and redeployment. | High: Schema changes propagate instantly via metadata updates. |
| Code Complexity | O(N): Linear growth with every new screen. | O(1): Constant complexity (single generic interpreter). |
7.4 Conclusion on Frontend Role
By adopting the Interpreter Pattern, xF effectively treats the frontend framework as a Host Shell. This aligns with the Separation of Concerns principle by isolating the presentation mechanism (rendering pixels) from the presentation logic (what fields to show). However, the architecture remains flexible enough to support hybrid approaches, where core ERP modules use the Interpreter for efficiency, while specialized dashboards use static binding for bespoke visualisation.
8. Comparative Analysis and Architectural Positioning
The architectural novelty of xF lies not in its functional outputs—which intersect with standard enterprise requirements—but in its underlying execution mechanism. This section situates xF within the broader landscape of software architecture, contrasting it with classical Model-View-Controller (MVC) patterns, Generative AI methodologies, and Low-Code/No-Code (LCNC) platforms.
8.1 xF vs. Compiled Model-View-Controller (MVC) Frameworks
Traditional enterprise development (e.g., Spring Boot, .NET Core) is predicated on a Compiled Class Hierarchy. In this model, domain semantics are fragmented across static artifacts: SQL schemas, Data Transfer Objects (DTOs), and Object-Relational Mappings (ORMs). This fragmentation dictates a vertical change cascade, where a singular modification to the domain model requires synchronised updates across the entire application stack.
xF replaces the static compiled class with the Virtual Active Record. The primary architectural distinctions include:
- Semantic Unification: Whereas MVC separates "truth" between persistence layers and compiled code, xF treats the Meta-Model as the exclusive source of truth, eliminating the need for design-time synchronization.
- Runtime Malleability: In MVC, an entity is a rigid artifact defined at compile-time; in xF, an entity is a dynamic dictionary constructed and mutated at runtime, facilitating immediate domain evolution.
- Polymorphic Efficiency: MVC architectures typically require unique controllers for every entity, leading to codebase expansion; xF utilises a generic, polymorphic engine that maintains constant code complexity regardless of domain size.
8.2 The Interpretive vs. Generative Paradigm
A significant distinction exists between xF’s metadata-driven approach and the emerging Generative AI or Low-Code spectrum. While both seek to reduce manual boilerplate, they diverge fundamentally in their treatment of software artifacts.
Figure 7. Architectural bifurcation: Generative approaches (creating artifacts) vs. Interpretive approaches (executing intent).
8.2.1 Static Artifact Inflation in Generative AI
Generative AI tools (e.g., Cursor, Replit) accelerate the production of software but maintain the status quo of Static Artifacts. These tools generate imperative code that must be committed, tested, and maintained. Consequently, such tools may accelerate the accumulation of technical debt by rapidly expanding the codebase that requires long-term maintenance, rather than addressing the structural coupling that causes the debt.
xF, conversely, treats code as a liability to be minimised. By utilising a generic runtime, xF bypasses the generation of binding code entirely, focusing on the execution of intent rather than the creation of artifacts.
8.2.2 Metadata Transparency vs. Proprietary Opacity
Commercial LCNC platforms frequently encapsulate application logic within proprietary, opaque formats (e.g., binary blobs or vendor-specific XML). This creates a barrier to standard engineering practices such as granular version control and external auditing.
xF implements a Transparent Metadata Persistence model. The system definition consists of standard relational records and structured JSON documents residing alongside domain data. This ensures that application logic is fully introspectable via standard Data Manipulation Language (DML), preventing the vendor lock-in and "black-box" risks associated with traditional visual environments.
8.3 Recursive Implementation and Self-Description
A distinguishing technical feature of xF is its recursive architecture. The framework is not merely configured by metadata; it is constituted by it. The framework’s internal structural definitions (e.g., T_ZXF_ENTITY) utilise the same persistence and interpretation mechanisms as user-defined business entities (e.g., T_GK_CLIENT). This aligns the system more closely with the principles of a Self-Describing Virtual Machine than a traditional application builder.
9. Implementation Sketch
To illustrate the wire protocol in a real-world Vehicle Allocation scenario, we present an extract from the ot_trip entity.
The following JSON illustrates the Dual Payload design:
z for the transactional trip data and y for the UI/validation metadata, including lookups for vehicles and drivers.
The frontend interpreter utilises the `p10` arrays in the `y` segment to render dropdowns for Vehicles and Drivers, while the `z` segment retains the selected Foreign Keys (103 and 13).
10. Conclusion and Future Directions
This paper demonstrates that a metadata-centric runtime interpreter provides a robust architectural alternative to the vertically coupled enterprise systems that dominate contemporary practice. By elevating the domain model to an active Meta-Model—acting as a true “Rosetta Stone” for enterprise semantics—xF dynamically interprets this single source of truth across storage, transport, logic, and presentation layers.
In doing so, xF evidences that rapid adaptability, stateless execution, and horizontal scalability can be achieved without generating rigid code artifacts. The architecture fulfils the long-standing promises of Model-Driven Architecture (MDA) and Adaptive Object-Models within a modern, web-native context, ensuring that enterprise semantics govern structure rather than compiled code.
Specifically, the primary contributions of this paper are:
- A metadata-driven runtime interpreter: An engine that externalises the domain model into a structured Meta-Model, functioning as a Rosetta Stone to guarantee cross-layer consistency.
- A unified API with semantic unification: A single pair of endpoints that serve the entire domain graph, mitigating controller sprawl by responding to conceptual requests with both data and interpretative metadata.
- A Virtual Active Record model: A runtime construct that dynamically generates entity instances from metadata, eliminating the rigid static coupling between compiled classes and database tables.
- A dual-payload transport mechanism: An asymmetrical payload strategy separating transactional state (
z) from structural metadata (y) to maintain strict statelessness and optimise performance. - A working system demonstrating feasibility: A production-ready system deployed in industrial contexts, proving that this architecture delivers the velocity of low-code platforms while preserving structural transparency and horizontal scalability.
Beyond its architectural contributions, xF has demonstrated clear practical value in industrial deployments. Within our organisation, the adoption of xF has substantially compressed the software delivery lifecycle, with the interval from initial concept to operational implementation dropping from multi-week cycles to timeframes measured in days. Crucially, xF achieves these gains—matching the productivity of low-code/no-code platforms—while preserving structural transparency and avoiding proprietary vendor lock-in.
10.1 Future Directions: Generative Metamodelling
A persistent barrier to the adoption of metadata-driven systems is the initial overhead required to construct comprehensive domain models. However, recent advancements in Large Language Models (LLMs) present a transformative opportunity: the automatic synthesis of high-quality Meta-Model definitions from natural-language specifications.
By fine-tuning LLMs on established enterprise data dictionaries (such as SAP modules or Oracle Transportation Management) and providing them with natural-language prompts, it becomes feasible to synthesize complex Meta-Models directly. Instead of defining entities and relationships manually, a designer can specify intent ("build a payroll system with jurisdiction-specific compliance workflows"), and the model generates the corresponding metadata.
e.g. OTM, SAP] --> B[Domain-Conditioned LLM] B --> C[Generated Meta-Model
Entities, Constraints] C --> D[xF Runtime Interpreter
Schema Sync, UI] D --> E[Operational Application] F[Natural-Language Prompt] -.-> B
Figure 8. Generative metamodelling pipeline. Domain-conditioned LLMs ingest schemas and prompts to synthesize declarative metadata, which the xF runtime then interprets.
This synthesis approach differs fundamentally from contemporary AI coding assistants. Current tools generate imperative source code, which inflates the codebase, accelerates technical debt accumulation, and introduces profound security and safety risks. As evaluated by Chen et al. (2021) in their analysis of code-generating models, the generation of imperative code carries inherent risks of producing exploitable vulnerabilities, misaligned control flows, and unpredictable side effects. Because imperative code dictates how a system executes operations step-by-step, guaranteeing the safety of LLM-generated logic requires rigorous, context-aware auditing that is exceedingly difficult to automate at scale.
In contrast, an LLM integrated with xF generates only declarative metadata. By constraining the LLM to output structural definitions (JSON schemas) rather than executable instructions, the architecture naturally neutralizes the primary security vectors associated with imperative code generation. This yields two critical advantages:
- Semantic Grounding: The xF Meta-Model imposes strict structural constraints, ensuring that generated schemas remain valid with respect to SQL and JSON runtime invariants.
- Safe Execution Boundary: Because metadata is not executable code, LLM-generated artifacts cannot introduce arbitrary control flow or security vulnerabilities, preserving system predictability.
Figure 9. Safety boundary between generative modelling and execution. LLMs produce declarative metadata only; the xF runtime performs all execution.
The convergence of domain-conditioned LLMs and metadata-interpreted runtimes constitutes a highly promising research frontier. If realised, this synthesis could redefine how enterprise software is conceived, enabling organisations to generate robust, bespoke systems safely and at unprecedented velocities, securely bounded by architectural determinism.
10.2 Future Directions: Metadata-Injected Micro-Frontends and the Zero-Build Shell
While xF is fundamentally headless, a parallel research track explores extending the metadata paradigm directly into the presentation layer to address the escalating complexity and tooling fatigue associated with modern frontend frameworks (e.g., React, Angular). We propose a Zero-Build Host Shell architecture that revitalizes traditional web development primitives (HTML, CSS, and vanilla JavaScript) by treating UI components themselves as runtime metadata.
In this model, frontend components are not compiled into a static bundle. Instead, developers author encapsulated HTML, CSS, and JavaScript templates within a web-based, CodePen-like environment, persisting them directly into the Meta-Model as database records. At runtime, the Generic Object Server retrieves these definitions and injects them into the y segment of the dual-payload alongside the data and validation hints.
A lightweight host shell (utilising a reactive framework subset, such as a fork of Petite-Vue) interprets this payload upon page load, dynamically synthesizing the components and binding them to the transactional state. This approach yields several significant architectural and commercial implications:
- Elimination of the Build Step: By storing executable presentation logic in the database and assembling it dynamically, the architecture bypasses complex bundling pipelines (e.g., Webpack, Vite), creating a truly dynamic, runtime-assembled frontend.
- Live Component Mutability: Because components are data records, authorized users can modify the UI live in production without triggering a redeployment cycle.
- Plug-and-Play Ecosystems: This mechanism naturally supports a micro-frontend architecture where discrete components can be licensed, shared, and injected into the host shell at runtime, opening commercial avenues for plug-and-play UI modules.
- Democratization of Development: By stripping away framework-specific abstractions, the system becomes highly accessible to traditional web developers and casual programmers, aligning with the core low-code ethos of xF.
By bridging the gap between Server-Driven UI (SDUI) and Micro-Frontends, this direction represents the logical extreme of the Rosetta Stone approach: asserting that even the presentation implementation can be abstracted, persisted, and interpreted dynamically as metadata.
11. References
- Atkinson, C., & Kühne, T. (2003). Model-driven development: A metamodeling foundation. IEEE Software, 20(5), 36–41.
- Atkinson, C., & Kühne, T. (2017). The essence of multilevel modeling. Proceedings of the ACM/IEEE 20th International Conference on Model Driven Engineering Languages and Systems, 43–53.
- Bernstein, P. A., & Newcomer, E. (2009). Principles of Transaction Processing. Morgan Kaufmann.
- BusinessObjects. (1995). BusinessObjects Universe: Semantic Layer Documentation. Business Objects S.A.
- Chen, M., et al. (2021). Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374.
- Czarnecki, K. (2015). Variability modeling in software product lines. In Model-Driven Software Engineering in Practice (pp. 87–110). Morgan & Claypool.
- dbt Labs. (2024). The dbt Semantic Layer: A Universal Definition of Business Metrics. dbtlabs.com.
- de Lara, J., & Vangheluwe, H. (2002). AToM³: A tool for multi-formalism and meta-modelling. Fundamenta Informaticae, 47(3–4), 285–313.
- Evans, E. (2003). Domain-Driven Design: Tackling Complexity in the Heart of Software. Addison-Wesley.
- Ferraiolo, D. F., & Kuhn, D. R. (1992). Role-based access controls. 15th National Computer Security Conference.
- Fielding, R. T. (2000). Architectural Styles and the Design of Network-based Software Architectures. PhD dissertation, UC Irvine.
- Fowler, M. (2002). Patterns of Enterprise Application Architecture. Addison-Wesley.
- Fowler, M. (2004). Presentation Model. martinfowler.com.
- France, R., & Rumpe, B. (2007). Model-driven development of complex software: A research roadmap. Future of Software Engineering (FOSE '07), 37–54.
- Gamma, E., Helm, R., Johnson, R., & Vlissides, J. (1994). Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley.
- González, J. (2011). Semantic Layers for Business Intelligence Systems. Master’s thesis, University of A Coruña.
- Gronback, R. (2009). Eclipse Modeling Project: A Domain-Specific Language Toolkit. Addison-Wesley.
- Hadi, M. (2020). Metadata-Driven Application Development in Low-Code Platforms. Master’s thesis, Delft University of Technology.
- Hasura. (2024). The Supergraph Architecture: Federated Data Access for Modern Enterprises. Hasura Inc.
- Hitzler, P., Krötzsch, M., & Rudolph, S. (2009). Foundations of Semantic Web Technologies. CRC Press.
- Kelly, S., & Tolvanen, J.-P. (2008). Domain-Specific Modeling: Enabling Full Code Generation. Wiley.
- Luján-Mora, S. (2006). Semantic Modeling for Data Warehouses. Doctoral dissertation, University of Alicante.
- Maes, P. (1987). Concepts and experiments in computational reflection. OOPSLA '87, 147–155.
- Mendix. (2024). Model-Driven Development: The Core of the Mendix Platform. mendix.com.
- Miller, A. (2018). Understanding Low-Code Platforms: A Metadata-Driven Perspective. Master’s thesis, University of Manchester.
- Newman, S. (2015). Building Microservices. O’Reilly Media.
- OutSystems. (2024). The High-Performance Low-Code Platform. outsystems.com.
- Pawson, R. (2004). Naked Objects. PhD thesis, Trinity College Dublin.
- Pereira, R. (2014). Semantic Layers in Business Intelligence Architectures. Master’s thesis, University of Porto.
- PostgREST. (2024). Automatic REST API for any PostgreSQL Database. postgrest.org.
- Reynolds, J. C. (1993). The discoveries of continuations. Lisp and Symbolic Computation, 6(3–4), 233–247.
- Rutle, A. (2010). Diagram Predicate Framework: A Formal Approach to Model Transformation. Doctoral dissertation, University of Bergen.
- Sandhu, R. S., Coyne, E. J., Feinstein, H. L., & Youman, C. E. (1996). Role-based access control models. IEEE Computer, 29(2), 38–47.
- Smith, B. (2003). Ontology and information systems. In Formal Ontology in Information Systems (pp. 21–35).
- Soldani, J., Tamburri, D. A., & Van Den Heuvel, W.-J. (2018). The pains and gains of microservices: A systematic grey literature review. Journal of Systems and Software, 146, 215–232.
- Tiunov, P. (2020). The Universal Semantic Layer. Cube Dev.
- Yoder, J. W., & Johnson, R. (2002). The adaptive object-model architectural style. WICSA, 3–27.
12. Acknowledgments
The concepts described in this paper are part of the ongoing architectural work at XF Systems Ltd. The author thanks collaborators, early adopters, and the broader developer community whose historical work on MDA, metadata-driven systems, and interpreter-based UIs provided essential inspiration.