The tactical elements of DDD introduce a specific vocabulary (aggregates, entities, value objects, repositories, services, factories, domain events, and so on) when arriving at a solution. At the end of the day, we need to translate these concepts into running software. Over the years, we have employed a variety of programming paradigms, including procedural, object-oriented, functional, and aspect-oriented. Is it possible to apply DDD in conjunction with one or more of these paradigms? In this section, we will explore how some common programming paradigms and techniques help us express tactical design elements in code.
On the surface of it, DDD seems to simply replicate a set of OO terms and call them by different names. For example, the central concepts of tactical DDD such as aggregates, entities, and value objects could simply be referred to as objects in OO terms. Others such as services may not have a direct OO analog. So...