Keeping Models and Code in Sync: Roundtrip Engineering for Tactical Domain-Driven Design

📅 2026-08-06
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the misalignment between domain models and code in Domain-Driven Design (DDD) caused by divergent evolution rhythms. To resolve this, the authors propose JDomInO, a bidirectional synchronization toolchain grounded in a shared metamodel that, for the first time, supports forward code generation and reverse refactoring across all twelve tactical DDD building blocks, thereby ensuring continuous consistency between Java implementations and tactical models. The approach integrates metamodel-driven round-trip engineering, Java static analysis, deterministic code generation, and model reconstruction techniques, while leveraging structured domain models as a precise contextual layer for AI-powered programming assistants. The forward path has been fully validated in a hotel management scenario, the reverse path logic verified through unit tests, and end-to-end validation is currently underway.
📝 Abstract
Domain-Driven Design gives teams a shared vocabulary for complex business logic, but that vocabulary only stays useful as long as the model and the code agree with each other. In practice, they drift apart: code changes outpace the model, or model revisions never make it into the codebase. This paper presents JDomInO, a bidirectional synchronization toolchain for tactical DDD that keeps a Java codebase and its domain model connected through a shared metamodel, with the goal of keeping the two in sync as the system evolves. JDomInO generates Java code structure deterministically from a domain model (forward path) and reconstructs a domain model from existing Java code (reverse path). The forward path has been fully validated on a Hotel Management scenario covering all 12 building block types in the metamodel; the reverse path's mapping logic has passed unit testing, with end-to-end validation underway. We also outline how the structured domain model produced by JDomInO could serve as a precision context layer for AI code assistants, helping them respect aggregate boundaries and DDD semantics that raw source code alone does not convey.
Problem

Research questions and friction points this paper is trying to address.

Domain-Driven Design
model-code synchronization
roundtrip engineering
tactical DDD
metamodel
Innovation

Methods, ideas, or system contributions that make the work stand out.

bidirectional synchronization
Domain-Driven Design
metamodel
code generation
AI code assistants
🔎 Similar Papers
No similar papers found.