# ddd-practice **Repository Path**: amtech/ddd-practice ## Basic Information - **Project Name**: ddd-practice - **Description**: DDD pratice 领域驱动设计实践 - **Primary Language**: Go - **License**: BSD-2-Clause - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2024-04-28 - **Last Updated**: 2024-04-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### 领域驱动设计实践 DDD-Practice This is a domain-driven design (DDD) exercise demo, referencing the WildWorkout project by ThreeDotsLab. The project structure involves related ideas from DDD, CQRS, Clean Architecture, and Hexagon Architecture, and highly recommends reading a series of blogs in their GitHub repository. ![](README.assets/Architecture.png) However, personally, there are still some shortcomings in the current project structure: 1. Handlers defined in the application layer (App) need to be manually configured into the Application structure, which although simple and intuitive, is more cumbersome compared to dependency injection (DI). 2. There is no design of data transfer objects (DTOs), using domain objects (DO) and interface callers for data interaction is not secure and flexible enough. > Reference: https://github.com/ThreeDotsLabs/wild-workouts-go-ddd-example 这是一份领域驱动设计的练习DEMO,参考了ThreeDotsLab的WildWorkout项目。 项目结构涉及DDD、CQRS、Clean Architecture、Hexagon Architecture的相关思想,非常推荐阅读他们github仓库中的一系列博客。 但个人感觉,目前的项目结构仍存在一些不足: 1. 应用层(App)定义好的handler需要手动配置到Application结构体中,虽然简单直观,但相对于依赖注入(DI)会比较麻烦一些。 2. 没有设计数据传输对象(DTO),使用领域对象(DO)和接口调用者进行数据交互的话不够安全和灵活。 > 参考: https://github.com/ThreeDotsLabs/wild-workouts-go-ddd-example