Domain Driven (Note 1)

How to develop the aggregation root
anti-corrosion layer
business? How to govern the business structure? How to prevent the architecture? How to solve the complexity of application architecture?
Spring Cloud solves the distributed problem of architecture, and domain-driven is used as a methodology for business governance and institutional anti-corrosion.
Fertility Service Department and Anemia have domain models and
domain object business intentions. The entity is not a domain object, but a data carrier that is an anemia object. This approach will accumulate barbarous growth throughout the year with business development,
which will become corrupt and unmaintainable.

The characteristics of the domain model: the domain model is bounded by the boundaries and only reflects the objects of interest in the domain; the domain returns to the business directly, and has nothing to do with technology;

Entity: The entity needs a unique expression; the entity does not need to be associated with too many attributes. Customer and Address
value object expressions: he does not have a unique identifier, and its attributes are unchanged, with read-only attributes, so it is safely shared.

Domain services: The essence is operations or actions, not physical objects. These actions involve objects in multiple fields, and multiple objects are needed to complete this action.
Therefore, the responsibility for money operations cannot be assigned to a certain object. This is different from the object-oriented design where the attributes and behaviors are a class of objects.
Service is a natural paradigm.
Features: The operation is stateless.

Aggregates and Aggregate Root
Aggregates are called root entities, and aggregate roots are also entities. Aggregate root is a concept in DDD, which is a larger encapsulation.

Boundary context
Different businesses need to communicate with each other, which involves cross-boundary integration. Integration cannot be a simple rpc call, it needs a special anti-corrosion layer conversion. The anti-corrosion layer is
mainly the decoupling of external dependencies. As well as avoiding external domain concepts to pollute the internal entities of the context.

Factory
used to create domain objects, shielding the creation details.

Warehousing and resource library
Warehousing is similar to collections, and the objects stored in the warehousing must be aggregates. Avoid dealing directly with the database

CQRS architecture: The command part is separated from the query part, and the command part can be designed with domain-driven design. The query part is more flexible

Driving events: event source

Halo architecture design

How to implement the replacement from model to code, and make the code have scalability, maintainability, and high-tech indicators? Models in the field of how to prevent epidemics may
cause old-fashioned questions about the subject, or cause unacceptable performance problems.

How to design and develop a DDD application framework?
Domain-driven framework: Java-based Axon Freemark \J

Guess you like

Origin blog.csdn.net/weixin_39472101/article/details/114251217