Institutional Repository of Vilnius University
Evaluating rich domain model impact on software maintainability /
Abstract
dc:descriptionThe design approach adopted when building a software system significantly influences its maintainability. Two widely used approaches - the anemic domain model (ADM) and the rich domain model (RDM) - differ fundamentally in how business logic is structured within the codebase. Despite this, empirical comparisons between them are scarce and methodologically limited, typically evaluating only a single maintainability dimension at a fixed point in time, without tracking how differences develop as the system evolves. This thesis evaluates the impact of ADM and RDM on software maintainability through a controlled experiment. Two functionally equivalent C# backend implementations of an order management system were constructed - one following ADM, one following RDM using Domain-Driven Design (DDD) tactical patterns - and evolved through four sequential business rule scenarios: a discount system, order cancellation rules, refund functionality, and tax calculation. Maintainability was assessed using a two-phase measurement framework: structural metrics (lines of code, number of classes, cyclomatic complexity, coupling between objects, and lack of cohesion of methods) measured at five points across both implementations, and evolution metrics (modification scope and net code line changes) measured per scenario. The results show that neither approach is uniformly superior. RDM exhibited better average cohesion throughout the experiment, but this advantage diminished from -36.8% at baseline to -7.1% after the final scenario. RDM consistently showed higher average coupling, contrary to theoretical predictions, and evolution metrics did not support the hypothesis that RDM requires fewer modifications per change. The thesis concludes that RDM is the more appropriate choice for behaviour-rich domains with intricate lifecycle logic and significant expected growth, while ADM is more suitable for simpler domains, early-phase projects, or teams unfamiliar with DDD patterns.
Degree
thesis:*- Grantor dc:publisher
- Institutional Repository of Vilnius University
- Year dc:date
- 2026
Author and committee
dc:creator, dc:contributor.*- Author dc:creator
-
- Wilkialis, Linas,
Subjects
dc:subject × 1Rights
dc:rights- Statement dc:rights
-
- info:eu-repo/semantics/openAccess
- Language dc:language
- eng
Identifiers
dc:identifier.*- Repository record dc:identifier
- https://repository.vu.lt/VU:ELABAETD308339237&prefLang=en_US