Semantics, Cybersecurity & Services (SCS)

Incorporating Behavioral Specification into Domain-Driven Design for Microservice Code Generation

MASTER Assignment

Incorporating Behavioral Specification into Domain Driven Design For Microservice Code Generation

Type : Master M-CS

Period: February - September, 2026

Student: Nguyên, M.T. (Trang, Student M-CS)

Date Final project: September 23, 2026

Thesis

Supervisors:

Background:

Microservice architecture (MSA) has been widely adopted for its maintainability, scalability, and reliability over monolithic systems, but these benefits depend on optimized service granularity. Domain-driven design (DDD) addresses this through bounded contexts and explicit domain modeling, which align with business-centric decomposition. This raises a further question of whether microservice implementations can be automatically generated from domain models. Existing transformation approaches are bounded by the absence of behavioral information in DDD models, leaving code generated at the level of structural stubs without method bodies.

Aim: This research aimed to integrate behavioral artifacts into DDD models to enable the automated generation of microservice implementations with complete business logic in the core and supporting subdomains. Generic subdomains such as authentication and monitoring, which require third-party integration, have been ignored.

Method: Following Design Science Research, we analyzed the layered architecture Evans recommends for DDD-based systems, classifying the operations of each layer by whether their implementation is derivable from a DDD model or requires additional behavioral information. Comparing these requirements against existing behavioral modeling languages revealed the verbosity of expressing actions on domain objects. An additional comparison of DDD languages revealed complementary deficiencies: underspecified data types and ambiguous domain object lifecycles. This motivated the design of DACT (Domain and ACTivity), a DSL with graphical notation, unifying domain and behavioral modeling by combining UML activity diagram constructs with DDD concepts. DACT is then used as input in an end-to-end MDE transformation chain that passes through an intermediate platform-independent model (PIM) before generating microservice code in Java. Evans' Cargo case study was used for validation through unit testing and functional testing.