ddd (Domain-Driven Design)

58 阅读1分钟

home.cs.colorado.edu/~kena/class…

Domain-Driven Design Communication Structure

image.png

Communication between developers and domain experts is facilitated by the development of a UBIQUITOUS LANGUAGE and a single model.

  • UBIQUITOUS LANGUAGE
    • The language that is used across aspects of the project.
  • a single model

Iterative Process

• A model is not a one-shot deal. • Rather the model emerges out of multiple iterations of refactoring, discussion and knowledge evolution. • Start with an initial model that is a best guess based on a discussion with domain experts. • Evolve the model throughout the lifetime of the project.

Layered Architecture

• The architecture can be separated into layers with specific responsibilities, – User Interface – Application – Domain – Infrastructure

Domain Layer Building Blocks

Associations

Three patterns of model elements

  • Entities

    • An object that represents something with continuity and identity – something that is tracked through different states or even across different implementations
  • Value Objects

    • Attribute that describes the state of a particular object aspect
  • Services

    • Actions or operations
    • “Although it is a slight departure from object-oriented modeling tradition, it is often best to express theses as SERVICES, rather than forcing responsibility for an operation onto some ENTITY or VALU OBJECT (pg. 82).”

Modules

  • “The ideas of high cohesion and low coupling, foten thought of as technical metirics, can be applied to the concepts themselves. In a MODEL-DRIVEN DESIGN, MODULES are part of the model, and they should reflect concepts in the domain (pg. 82).”