# ddd-datasure **Repository Path**: robbinqin/ddd-datasure ## Basic Information - **Project Name**: ddd-datasure - **Description**: ddd落地实践 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2024-05-16 - **Last Updated**: 2024-05-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README #### 一、模块划分解释 - Types模块 >Types模块是保存可以对外暴露的Domain Primitives的地方。Domain Primitives因为是无状态的逻辑,可以对外暴露,所以经常被包含在对外的API接口中,需要单独成为模块。Types模块不依赖任何类库,纯 POJO 。 - Domain领域模块 >Domain 模块是核心业务逻辑的集中地,包含有状态的Entity、领域服务Domain Service、以及各种外部依赖的接口类(如Repository、ACL、中间件等。Domain模块仅依赖Types模块,也是纯 POJO 。 - Application应用模块 >Application模块主要包含Application Service和一些相关的类。Application模块依赖Domain模块。还是不依赖任何框架,纯POJO。 - Infrastructure基础设施,包含了Persistence、Messaging、External等模块。 - Persistence持久化模块; >比如:Persistence模块包含数据库DAO的实现,包含Data Object、ORM Mapper、Entity到DO的转化类等。Persistence模块要依赖具体的ORM类库,比如MyBatis。如果需要用Spring-Mybatis提供的注解方案,则需要依赖Spring。 - Messaging通信模块 - External外部依赖模块 - Web模块 >Web模块包含Controller等相关代码。如果用SpringMVC则需要依赖Spring。 - Start模块 >Start模块是SpringBoot的启动类。 #### 二、设计思路来源 - [阿里技术专家详解 DDD 系列 第一讲- Domain Primitive](https://zhuanlan.zhihu.com/p/340911587) - [阿里技术专家详解DDD系列 第二讲 - 应用架构](https://zhuanlan.zhihu.com/p/343388831) - [阿里技术专家详解DDD系列 第三讲 - Repository模式](https://zhuanlan.zhihu.com/p/348706530) - [阿里技术专家详解DDD系列 第四讲 - 领域层设计规范](https://zhuanlan.zhihu.com/p/356518017) - [阿里技术专家详解DDD系列 第五讲:聊聊如何避免写流水账代码](https://zhuanlan.zhihu.com/p/366395817) #### 各层单元测试 ## 是的