文章分类 -  领域驱动设计

领域驱动设计
摘要:Use Dependency Injection to inject infrastructure objects into your application layer 使用依赖注入将基础设施对象注入到你的应用层 As mentioned previously, the application l 阅读全文
posted @ 2026-05-19 12:03 菜鸟吊思 阅读(9) 评论(0) 推荐(0)
摘要:Use SOLID principles and Dependency Injection 运用 SOLID 原则与依赖注入 SOLID principles are critical techniques to be used in any modern and mission-critical 阅读全文
posted @ 2026-05-19 11:03 菜鸟吊思 阅读(8) 评论(0) 推荐(0)
摘要:When you use NoSQL databases for your infrastructure data tier, you typically do not use an ORM like Entity Framework Core. Instead you use the API pr 阅读全文
posted @ 2026-05-19 10:58 菜鸟吊思 阅读(7) 评论(0) 推荐(0)
摘要:When you use relational databases such as SQL Server, Oracle, or PostgreSQL, a recommended approach is to implement the persistence layer based on Ent 阅读全文
posted @ 2026-05-19 10:35 菜鸟吊思 阅读(10) 评论(0) 推荐(0)
摘要:Data persistence components provide access to the data hosted within the boundaries of a microservice (that is, a microservice's database). They conta 阅读全文
posted @ 2026-05-19 10:03 菜鸟吊思 阅读(11) 评论(0) 推荐(0)
摘要:Use domain events to explicitly implement side effects of changes within your domain. In other words, and using DDD terminology, use domain events to 阅读全文
posted @ 2026-05-17 19:43 菜鸟吊思 阅读(18) 评论(0) 推荐(0)
摘要:Even when the source of truth is the domain model and ultimately you must have validation at the domain model level, validation can still be handled a 阅读全文
posted @ 2026-05-17 19:09 菜鸟吊思 阅读(7) 评论(0) 推荐(0)
摘要:In DDD, validation rules can be thought as invariants. The main responsibility of an aggregate is to enforce invariants across state changes for all t 阅读全文
posted @ 2026-05-17 19:06 菜鸟吊思 阅读(10) 评论(0) 推荐(0)
摘要:Enumerations (or enum types for short) are a thin language wrapper around an integral type. You might want to limit their use to when you are storing 阅读全文
posted @ 2026-05-17 18:58 菜鸟吊思 阅读(9) 评论(0) 推荐(0)
摘要:As discussed in earlier sections about entities and aggregates, identity is fundamental for entities. However, there are many objects and data items i 阅读全文
posted @ 2026-05-17 18:54 菜鸟吊思 阅读(10) 评论(0) 推荐(0)
摘要:The solution folder contains a SeedWork folder. This folder contains custom base classes that you can use as a base for your domain entities and value 阅读全文
posted @ 2026-05-17 18:30 菜鸟吊思 阅读(13) 评论(0) 推荐(0)
摘要:In the previous section, the fundamental design principles and patterns for designing a domain model were explained. Now it's time to explore possible 阅读全文
posted @ 2026-05-17 18:23 菜鸟吊思 阅读(13) 评论(0) 推荐(0)
摘要:Define one rich domain model for each business microservice or Bounded Context. 为每个业务微服务或限界上下文(Bounded Context)定义一个丰富的领域模型。 Your goal is to create a s 阅读全文
posted @ 2026-05-17 18:03 菜鸟吊思 阅读(15) 评论(0) 推荐(0)
摘要:Domain-driven design (DDD) advocates modeling based on the reality of business as relevant to your use cases. In the context of building applications, 阅读全文
posted @ 2026-05-17 17:47 菜鸟吊思 阅读(24) 评论(0) 推荐(0)
摘要:For reads/queries, the ordering microservice from the eShopOnContainers reference application implements the queries independently from the DDD model 阅读全文
posted @ 2026-05-17 17:33 菜鸟吊思 阅读(15) 评论(0) 推荐(0)
摘要:The design of the ordering microservice at the eShopOnContainers reference application is based on CQRS principles. However, it uses the simplest appr 阅读全文
posted @ 2026-05-17 17:15 菜鸟吊思 阅读(11) 评论(0) 推荐(0)
摘要:CQRS is an architectural pattern that separates the models for reading and writing data. The related term Command Query Separation (CQS) was originall 阅读全文
posted @ 2026-05-17 17:07 菜鸟吊思 阅读(13) 评论(0) 推荐(0)
摘要:Design a domain model for each microservice or Bounded Context that reflects understanding of the business domain. 为每个微服务或限界上下文设计一个领域模型,以反映对业务领域的深刻理解。 阅读全文
posted @ 2026-05-17 17:02 菜鸟吊思 阅读(11) 评论(0) 推荐(0)
摘要:As mentioned before, Business Logic in the Domain Driven Design is split into two parts (layers): Domain Logic and Application Logic: 正如前面所提到的,领域驱动设计( 阅读全文
posted @ 2026-05-17 16:39 菜鸟吊思 阅读(15) 评论(0) 推荐(0)
摘要:This section will demonstrate some example use cases and discuss alternative scenarios. 本节将演示一些具体的示例用例,并探讨其他可能的替代场景。 Entity Creation 实体创建 Creating an 阅读全文
posted @ 2026-05-17 15:32 菜鸟吊思 阅读(9) 评论(0) 推荐(0)