正在显示
3 个修改的文件
包含
97 行增加
和
8 行删除
不能预览此文件类型
| @@ -52,3 +52,80 @@ | @@ -52,3 +52,80 @@ | ||
| 52 | ### 限界上下文 | 52 | ### 限界上下文 |
| 53 | 53 | ||
| 54 | ### 上下文映射 | 54 | ### 上下文映射 |
| 55 | + | ||
| 56 | +## 领域驱动设计-战术建模 | ||
| 57 | +### 实体 | ||
| 58 | + | ||
| 59 | +### 值对象 | ||
| 60 | + | ||
| 61 | +### 聚合根 | ||
| 62 | + | ||
| 63 | +### 领域服务 | ||
| 64 | + | ||
| 65 | +### 领域事件 | ||
| 66 | + | ||
| 67 | +## 领域驱动设计工程实现 | ||
| 68 | +### 模块 | ||
| 69 | + | ||
| 70 | +### 领域对象 | ||
| 71 | + | ||
| 72 | +### 资源库 | ||
| 73 | + | ||
| 74 | +### 防腐层 | ||
| 75 | + | ||
| 76 | +### 领域服务 | ||
| 77 | + | ||
| 78 | +### 数据流转 | ||
| 79 | + | ||
| 80 | +### 上下文集成 | ||
| 81 | + | ||
| 82 | +### 分离领域 | ||
| 83 | + | ||
| 84 | +## 功能模块实现 | ||
| 85 | + | ||
| 86 | +### 领域事件发布流程 | ||
| 87 | + | ||
| 88 | +### DTO模块开发 | ||
| 89 | + | ||
| 90 | +## 标准产品组工具使用 | ||
| 91 | +- 设置全局变量(替换YOUR-USER-PATH为你真实的项目路径) | ||
| 92 | + | ||
| 93 | + 1.生成路径(项目生成路径):/YOUR-USER-PATH/go/src/ | ||
| 94 | + | ||
| 95 | + 2.eggs根目录路径(领域描述语言DSL文档路径生成或引用路径):/YOUR-USER-PATH/go/src/allied-creation-cochron/document/ | ||
| 96 | + | ||
| 97 | + 3.egg名称(通常为项目名称,同样是DSL文件夹名称):boss-appointment | ||
| 98 | + | ||
| 99 | +- 应用描述语言生成 | ||
| 100 | + | ||
| 101 | + 1.应用描述语言egg脚手架生成 | ||
| 102 | + | ||
| 103 | + 2.生成属性(Attribute) | ||
| 104 | + | ||
| 105 | + 3.生成模式(Schema) | ||
| 106 | + | ||
| 107 | + 4.生成服务(Service) | ||
| 108 | + | ||
| 109 | + 5.生成接口(Api) | ||
| 110 | + | ||
| 111 | +- 具体工程生成 | ||
| 112 | + | ||
| 113 | + 1.生成接口文档(OpenApi) | ||
| 114 | + | ||
| 115 | + 2.生成项目代码脚手架 | ||
| 116 | + | ||
| 117 | + 3.生成领域模型 | ||
| 118 | + | ||
| 119 | + 4.生成应用服务 | ||
| 120 | + | ||
| 121 | + 5.生成Http协议接口 | ||
| 122 | + | ||
| 123 | +- Tips | ||
| 124 | + | ||
| 125 | + 1.代码生成器服务端500错误调试技巧 | ||
| 126 | + | ||
| 127 | + 在任务管理其中关闭由标准化平台带起的eggcode.exe,在命令行通过命令eggcode.exe http -p 9099启动生成器服务,这样就可以打印出生成器500错误的具体信息,关键还是在编写dsl时要细心,不需要的配置整体删干净,需要的配置写完整,注意属性名不要和golang的关键字或者保留字冲突,例如:type、no | ||
| 128 | + | ||
| 129 | + 2.集成调试技巧 | ||
| 130 | + | ||
| 131 | + Describe前面添加F可以针对当前用例进行测试,同样的It前面增加F也可以针对一个Describe中的不同IT进行测试,F的意思为Focus,另外还有其他标记如:P(Pending) or X,详情参考ginkgo官方文档The Spec Runner章节[参考](https://onsi.github.io/ginkgo/) |
| @@ -4,28 +4,40 @@ | @@ -4,28 +4,40 @@ | ||
| 4 | <root> | 4 | <root> |
| 5 | <mxCell id="0"/> | 5 | <mxCell id="0"/> |
| 6 | <mxCell id="1" parent="0"/> | 6 | <mxCell id="1" parent="0"/> |
| 7 | - <mxCell id="2" value="实体" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;" vertex="1" parent="1"> | 7 | + <mxCell id="2" value="共创模式实体" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;" parent="1" vertex="1"> |
| 8 | <mxGeometry x="70" y="130" width="160" height="86" as="geometry"/> | 8 | <mxGeometry x="70" y="130" width="160" height="86" as="geometry"/> |
| 9 | </mxCell> | 9 | </mxCell> |
| 10 | - <mxCell id="3" value="+ field: type" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="2"> | 10 | + <mxCell id="3" value="+ field: type" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" parent="2" vertex="1"> |
| 11 | <mxGeometry y="26" width="160" height="26" as="geometry"/> | 11 | <mxGeometry y="26" width="160" height="26" as="geometry"/> |
| 12 | </mxCell> | 12 | </mxCell> |
| 13 | - <mxCell id="4" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" vertex="1" parent="2"> | 13 | + <mxCell id="4" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" parent="2" vertex="1"> |
| 14 | <mxGeometry y="52" width="160" height="8" as="geometry"/> | 14 | <mxGeometry y="52" width="160" height="8" as="geometry"/> |
| 15 | </mxCell> | 15 | </mxCell> |
| 16 | - <mxCell id="5" value="+ method(type): type" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="2"> | 16 | + <mxCell id="5" value="+ method(type): type" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" parent="2" vertex="1"> |
| 17 | <mxGeometry y="60" width="160" height="26" as="geometry"/> | 17 | <mxGeometry y="60" width="160" height="26" as="geometry"/> |
| 18 | </mxCell> | 18 | </mxCell> |
| 19 | - <mxCell id="6" value="值对象" style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;" vertex="1" parent="1"> | 19 | + <mxCell id="6" value="值对象" style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;" parent="1" vertex="1"> |
| 20 | <mxGeometry x="500" y="90" width="140" height="104" as="geometry"/> | 20 | <mxGeometry x="500" y="90" width="140" height="104" as="geometry"/> |
| 21 | </mxCell> | 21 | </mxCell> |
| 22 | - <mxCell id="7" value="+ field: type" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="6"> | 22 | + <mxCell id="7" value="+ field: type" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" parent="6" vertex="1"> |
| 23 | <mxGeometry y="26" width="140" height="26" as="geometry"/> | 23 | <mxGeometry y="26" width="140" height="26" as="geometry"/> |
| 24 | </mxCell> | 24 | </mxCell> |
| 25 | - <mxCell id="8" value="+ field: type" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="6"> | 25 | + <mxCell id="8" value="+ field: type" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" parent="6" vertex="1"> |
| 26 | <mxGeometry y="52" width="140" height="26" as="geometry"/> | 26 | <mxGeometry y="52" width="140" height="26" as="geometry"/> |
| 27 | </mxCell> | 27 | </mxCell> |
| 28 | - <mxCell id="9" value="+ field: type" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="6"> | 28 | + <mxCell id="9" value="+ field: type" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" parent="6" vertex="1"> |
| 29 | + <mxGeometry y="78" width="140" height="26" as="geometry"/> | ||
| 30 | + </mxCell> | ||
| 31 | + <mxCell id="10" value="共创项目实体" style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;" vertex="1" parent="1"> | ||
| 32 | + <mxGeometry x="150" y="370" width="140" height="104" as="geometry"/> | ||
| 33 | + </mxCell> | ||
| 34 | + <mxCell id="11" value="+ field: type" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="10"> | ||
| 35 | + <mxGeometry y="26" width="140" height="26" as="geometry"/> | ||
| 36 | + </mxCell> | ||
| 37 | + <mxCell id="12" value="+ field: type" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="10"> | ||
| 38 | + <mxGeometry y="52" width="140" height="26" as="geometry"/> | ||
| 39 | + </mxCell> | ||
| 40 | + <mxCell id="13" value="+ field: type" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="10"> | ||
| 29 | <mxGeometry y="78" width="140" height="26" as="geometry"/> | 41 | <mxGeometry y="78" width="140" height="26" as="geometry"/> |
| 30 | </mxCell> | 42 | </mxCell> |
| 31 | </root> | 43 | </root> |
-
请 注册 或 登录 后发表评论