πŸ‘·πŸΌβ€β™€οΈ DDD (Domain Driven Design)

GunhoΒ·2025λ…„ 1μ›” 21일

πŸ‘·πŸΌβ€β™€οΈ DDD (Domain Driven Design)

πŸ‘·πŸΌβ€β™€οΈ DDD (Domain Driven Design) is a method where a problem area is prioritised over the engineering practices.

DDD was introduced to address the complexities that arise from a poor understanding of the problems across interest groups, including developers, domain experts, and others.

DDD can be viewed in two design patterns:

  • β™ŸοΈ Strategic Pattern
  • 🎲 Tactical Design Pattern

β™ŸοΈ Strategic Pattern

Strategic Pattern in DDD puts a strong emphasis on the software structures and architectures in a way that addresses the problem domain.

Key concepts pivotal to Strategic Pattern are:

  1. Bounded Context
  • specific boundaries where the problem domains persist.
  1. Context Mapping
  • linking the interactions across varying Bounded Contexts.

Microsoft Available here


  1. Strategic Patterns
  • overall guidelines for developing a software architecture.
  • includes Aggregates, Domain Events, and Anti-Corruption Layer as its common practices.
  1. Shared Kernel
  • a common subset between varying Bounded Contexts.

Geeks for Geeks Available here


  1. Anti-Corruption Layer (ACL)
  • a strategic approach aimed at safeguarding a system from the impact of external or legacy systems that operate with different models or languages.

  • serves as an intermediary translation layer connecting the external system with the core domain model.

  1. Ubiquitous Language
  • shared vocabularies that all stakeholders share across the software development.

🎲 Tactical Design Pattern

Tactical Design Pattern defines a set of strategies that can be applied to construct the domain models within the software system.

  1. Entity
  • a domain object with a specific life cycle and a distinct identity.
  1. Value Object
  • an object that represents the values that may be immutable.
  1. Aggregate
  • a cluster of entities and value objects that becomes a single unit for data consistency.
  1. Repository
  • a layer that is responsible for directly communicating with the databases.
  1. Factory
  • a layer that is responsible for creating objects.
  1. Service
  • a layer that conducts all necessary business logic.

πŸ”­ DDD Analysis


πŸ”² DDD Pros

DDD can profit from the overall development cycle via:

  • πŸ—£οΈ effective communication across developers, domain experts, and other stakeholders

    • πŸ“£ followed by the use of Ubiquitous Language
  • 🚨 focus on real business problems than implementing unnecessary engineering practices


πŸ”³ DDD Cons

  • ⚽️ can introduce unnecessary complexities specifically from the large domain models

  • 🧠 overhead from implementing DDD leading to lowered productivity



πŸ“š References

Geeks for Geeks
Microsoft

profile
Hello

0개의 λŒ“κΈ€