分析和设计高阶(原“剔除伪创新的领域驱动设计”)讲解(字幕)

12
00:00:43,630 --> 00:00:47,530
我们上前面的课程的时候

13
00:00:48,710 --> 00:00:51,470
软件需求设计方法学UML这课程的时候

14
00:00:51,480 --> 00:00:54,390
我们是从面上过一遍

15
00:00:54,400 --> 00:00:55,910
之前是面上过一遍

16
00:00:56,710 --> 00:00:58,420
ABCD这样过一遍

17
00:00:59,520 --> 00:01:00,790
A-业务建模

18
00:01:00,800 --> 00:01:03,590
B-需求、C-分析、D-设计

19
00:01:04,580 --> 00:01:09,090
ABCD的概念一定要建立起来

20
00:01:09,300 --> 00:01:13,790
你要清楚自己当前处在哪个工作流

21
00:01:13,920 --> 00:01:15,350
这是一个基本的素质

22
00:01:16,940 --> 00:01:17,800
你到底是做A

23
00:01:17,810 --> 00:01:22,480
做B做C做D,然后其他的各种各样

24
00:01:22,490 --> 00:01:26,090
平时我们看到的各种花里胡哨的用语

25
00:01:27,440 --> 00:01:31,020
都可以用ABCD这个来套上去

26
00:01:32,110 --> 00:01:34,020
这个我们课上就不多说了

27
00:01:35,470 --> 00:01:36,820
大家可以扫码看文章

28
00:01:36,830 --> 00:01:38,580
或者看我们书里面都可以

29
00:01:40,530 --> 00:01:42,000
我们这次课实际上就是

30
00:01:42,010 --> 00:01:46,460
C和D这两个点上的精化

31
00:01:47,980 --> 00:01:50,740
也就是分析和设计的精化

32
00:01:56,580 --> 00:02:00,230
如果说一个人,一个开发人员

33
00:02:00,240 --> 00:02:03,660
他不具备 ABCD的知识

34
00:02:03,670 --> 00:02:06,170
很可能只有D的知识

35
00:02:07,620 --> 00:02:08,890
那就会出各种问题了

36
00:02:11,440 --> 00:02:12,680
他只有D的知识

37
00:02:12,690 --> 00:02:14,120
他只掌握了

38
00:02:14,130 --> 00:02:15,720
某一门编码的技能

39
00:02:16,700 --> 00:02:18,160
ABC都不知道

40
00:02:20,330 --> 00:02:21,410
但又不愿意去学习

41
00:02:23,050 --> 00:02:25,290
不愿意离开舒适区去学习

42
00:02:28,030 --> 00:02:31,810
往往他就会有两个偷懒的做法

43
00:02:33,100 --> 00:02:35,300
第一个,就是贬低ABC的作用

44
00:02:36,360 --> 00:02:36,700


45
00:02:38,490 --> 00:02:40,730
就是说,反正最后都要编码

46
00:02:40,820 --> 00:02:42,130
我直接编码不就行了吗

47
00:02:42,600 --> 00:02:42,880


48
00:02:43,260 --> 00:02:44,930
这个就是所谓的敏捷

49
00:02:48,630 --> 00:02:51,550
到处乱用Linus的那句话

50
00:02:51,840 --> 00:02:53,430
把你代码给我看什么之类的

51
00:02:56,530 --> 00:02:57,840
显然这是行不通的

52
00:03:00,070 --> 00:03:02,330
客观规律你就没法抵抗

53
00:03:03,850 --> 00:03:07,250
你这样说,忽悠大家直接编码

54
00:03:08,530 --> 00:03:12,520
结果最终出问题,开始一直爽

55
00:03:12,900 --> 00:03:14,010
后面就出问题

56
00:03:15,620 --> 00:03:17,820
所以他们也学乖了

57
00:03:18,150 --> 00:03:19,420
这帮人学乖了

58
00:03:19,430 --> 00:03:23,240
他又搞出一个从D的角度臆想ABC

59
00:03:25,220 --> 00:03:27,900
他也不用去学严谨的ABC怎么做

60
00:03:27,910 --> 00:03:28,660
不用去学

61
00:03:29,080 --> 00:03:34,360
他从程序员的角度去臆想ABC

62
00:03:36,980 --> 00:03:39,330
然后得到的ABC的方法

63
00:03:39,820 --> 00:03:41,750
特别适合程序员的胃口

64
00:03:43,290 --> 00:03:44,770
程序员一看就特别喜欢

65
00:03:45,880 --> 00:03:46,870
用得特别爽

66
00:03:47,600 --> 00:03:51,060
因为他从程序员的角度来思考的

67
00:03:53,920 --> 00:03:57,780
但是对做出好卖的软件

68
00:03:58,980 --> 00:04:05,050
做出坚固的、稳定的软件是没有帮助的

69
00:04:07,050 --> 00:04:11,800
所以如果只有D的知识

70
00:04:13,860 --> 00:04:15,860
没有ABC知识,又不愿意学习的话

71
00:04:16,200 --> 00:04:17,930
就会出现很多伪创新

72
00:04:19,160 --> 00:04:20,630
这些我都列举在这里了

73
00:04:21,750 --> 00:04:23,190
大家自己扫码去看

74
00:04:23,200 --> 00:04:25,450
我们课上就不多说了

75
00:04:25,460 --> 00:04:26,610
大家自己看文章

76
00:04:33,450 --> 00:04:39,660
好,这是我们开头说的,一些开始的话

77
00:04:40,740 --> 00:04:42,650
第一个知识点,我们来说一下

78
00:04:42,660 --> 00:04:44,210
核心域这个概念

79
00:04:46,330 --> 00:04:47,480
我们知道我们的软件

80
00:04:48,510 --> 00:04:50,270
封装了很多知识

81
00:04:51,120 --> 00:04:55,940
也就是说,你要能够把一个软件做出来

82
00:04:57,710 --> 00:04:58,990
或者说,我们叫信息系统

83
00:04:59,120 --> 00:05:04,940
说信息系统,就是处理信息的这种系统

84
00:05:05,360 --> 00:05:06,710
信息进来

85
00:05:07,820 --> 00:05:08,420
信息出去

86
00:05:11,350 --> 00:05:14,780
包括我们桌面的软件、网站、APP

87
00:05:15,290 --> 00:05:19,250
各种各样不可见的后台的系统

88
00:05:20,230 --> 00:05:22,170
都是,只要你是处理信息的

89
00:05:24,550 --> 00:05:26,880
通通我们叫信息系统,或者叫软件

90
00:05:28,940 --> 00:05:30,180
你要把它做出来的话

91
00:05:31,290 --> 00:05:33,970
那么你就要懂得很多很多的知识

92
00:05:37,940 --> 00:05:40,250
那么你要能够把它做出来

93
00:05:41,100 --> 00:05:42,220
满足需求

94
00:05:44,480 --> 00:05:47,140
首先,你表达这些知识

95
00:05:48,090 --> 00:05:49,960
要能够准确地把它表达出来

96
00:05:50,540 --> 00:05:50,840


97
00:05:51,450 --> 00:05:52,670
如果你表达都不准确

98
00:05:52,680 --> 00:05:55,170
你出来结果肯定是不对的

99
00:05:57,450 --> 00:05:59,120
这是最起码的要求

100
00:06:00,910 --> 00:06:02,100
在这个基础上

101
00:06:04,520 --> 00:06:06,840
如果有可能,低成本地做出来

102
00:06:11,340 --> 00:06:13,240
因为你软件开发是什么

103
00:06:14,010 --> 00:06:18,050
不是说你念个咒语,就梆的一声就出现了

104
00:06:18,060 --> 00:06:20,720
它是一点点做出来的

105
00:06:21,190 --> 00:06:23,150
你先做第一个功能,再做第二个

106
00:06:23,160 --> 00:06:24,070
再做第三个

107
00:06:28,410 --> 00:06:31,890
那么你不同的这种组织知识的方式

108
00:06:34,780 --> 00:06:36,700
就导致了你做第二个的时候

109
00:06:37,650 --> 00:06:40,650
对前面已经做好的工作要做多少修改

110
00:06:40,780 --> 00:06:42,010
成本有多高

111
00:06:43,890 --> 00:06:45,960
如果说,你组织知识不合理

112
00:06:46,560 --> 00:06:48,080
虽然最终也能做出来

113
00:06:48,090 --> 00:06:49,760
但是这个过程很痛苦

114
00:06:50,560 --> 00:06:53,480
每加一个功能就要改很多

115
00:06:54,450 --> 00:06:56,650
或者每改一个地方就改很多地方

116
00:06:58,210 --> 00:06:59,080
成本很高

117
00:07:02,150 --> 00:07:04,260
如果说你要想获得利润的话

118
00:07:05,130 --> 00:07:10,460
显然,你光是达到第一个境界是不够的

119
00:07:13,350 --> 00:07:15,260
必然要达到第二个境界

120
00:07:15,270 --> 00:07:16,890
就是合理的组织

121
00:07:17,680 --> 00:07:20,430
然后让我们的开发团队

122
00:07:20,440 --> 00:07:21,630
低成本

123
00:07:22,490 --> 00:07:23,770
满足系统的需求

124
00:07:26,350 --> 00:07:31,000
要达到这个,那就要合理的组织了

125
00:07:31,550 --> 00:07:33,630
不是说我能够表达出来就行了

126
00:07:34,460 --> 00:07:35,210
还不够的

127
00:07:38,020 --> 00:07:40,250
不管你是用什么方式来做

128
00:07:41,110 --> 00:07:44,850
这些思考都是逃不掉的

129
00:07:46,330 --> 00:07:47,860
你是大脑里面想

130
00:07:49,990 --> 00:07:51,230
你连纸笔都不用

131
00:07:52,750 --> 00:07:54,510
你大脑也会去想这些问题

132
00:07:54,520 --> 00:07:56,140
只不过怎么样

133
00:07:56,150 --> 00:07:59,080
有时候你想的是效率不高

134
00:07:59,650 --> 00:08:01,780
或者想的结果是不太对的

135
00:08:04,500 --> 00:08:04,890


136
00:08:04,900 --> 00:08:06,690
就像,就算你是一个学渣

137
00:08:07,860 --> 00:08:09,090
你参加考试的时候

138
00:08:09,100 --> 00:08:10,950
你想不想把它考好

139
00:08:11,720 --> 00:08:12,870
肯定也想

140
00:08:12,880 --> 00:08:14,470
就算你用瞎蒙法

141
00:08:14,960 --> 00:08:18,620
用瞪眼法,也是一个方法

142
00:08:19,080 --> 00:08:20,550
你也思考了

143
00:08:21,370 --> 00:08:24,500
也往想拿分那个方向去努力了

144
00:08:24,780 --> 00:08:27,030
只不过你能力有限

145
00:08:28,960 --> 00:08:29,960
拿不到分而已

146
00:08:30,430 --> 00:08:31,650
并不是说你不想拿分

147
00:08:34,160 --> 00:08:35,580
这些思考都逃不掉的

148
00:08:36,390 --> 00:08:41,590
就看你的思考有没有效果

149
00:08:41,600 --> 00:08:43,730
有没有效率,如此而已

150
00:08:43,900 --> 00:08:45,250
你可以用大脑思考

151
00:08:45,720 --> 00:08:47,040
也可以用纸笔辅助

152
00:08:47,460 --> 00:08:49,300
当然也可以用建模工具来辅助了

153
00:08:54,360 --> 00:08:55,330
那么这里要注意的

154
00:08:58,390 --> 00:09:00,990
要区分两种情况

155
00:09:03,370 --> 00:09:04,380
很厉害的人

156
00:09:05,740 --> 00:09:10,140
他可能这方面建模的经验非常丰富

157
00:09:11,180 --> 00:09:13,380
他一看到这个问题,就可以套用各种模式

158
00:09:13,390 --> 00:09:14,780
然后马上直接做出来了

159
00:09:16,950 --> 00:09:17,770
大脑很厉害

160
00:09:19,560 --> 00:09:20,740
大脑就可以完成了

161
00:09:21,420 --> 00:09:22,260
不用什么纸和笔

162
00:09:22,270 --> 00:09:24,100
也不用什么建模工具来画图

163
00:09:24,110 --> 00:09:27,740
他一看到问题,啪啪啪就可以大脑里建模

164
00:09:27,750 --> 00:09:28,660
然后直接编码

165
00:09:30,770 --> 00:09:31,650
另外一种怎么样

166
00:09:33,480 --> 00:09:35,110
他看到问题他也直接编码

167
00:09:35,670 --> 00:09:36,700
但他是乱编

168
00:09:37,060 --> 00:09:40,330
这两种不一样,在大脑里完成跟拍脑袋

169
00:09:40,340 --> 00:09:41,290
不是一个东西

170
00:09:43,250 --> 00:09:47,770
虽然这两个东西都不用草稿纸

171
00:09:48,690 --> 00:09:51,050
学霸,他很厉害,他一看这个题

172
00:09:51,800 --> 00:09:54,740
不就是我经常刷题刷到的吗

173
00:09:56,600 --> 00:09:58,750
不用草稿纸了,我一看就知道怎么做了

174
00:09:58,760 --> 00:09:59,390
直接答

175
00:10:01,200 --> 00:10:04,100
而学渣,他也不用草稿纸,为什么

176
00:10:05,610 --> 00:10:08,230
草稿纸对他没用,用草稿纸干嘛

177
00:10:08,240 --> 00:10:08,630
用来整理思路

178
00:10:09,300 --> 00:10:11,460
他怎么知道怎么整理

179
00:10:11,590 --> 00:10:13,950
他根本就不知道

180
00:10:13,960 --> 00:10:15,630
草稿纸给他干啥用

181
00:10:16,120 --> 00:10:18,380
他装模作样在草稿纸上乱画

182
00:10:19,750 --> 00:10:21,240
画漫画

183
00:10:22,010 --> 00:10:23,370
你看,这两个好像是一样的

184
00:10:24,450 --> 00:10:26,020
学霸不用草稿纸

185
00:10:26,350 --> 00:10:27,410
学渣也不用

186
00:10:28,230 --> 00:10:30,540
但这两个背后的本质是不一样的

187
00:10:32,230 --> 00:10:36,200
很多人经常抓住这两个共同点

188
00:10:36,490 --> 00:10:38,440
用学渣来冒充学霸

189
00:10:39,220 --> 00:10:40,560
这种要注意辨别

190
00:10:45,480 --> 00:10:48,790
刚才讲了知识的表达和组织要合理

191
00:10:50,060 --> 00:10:53,340
首先,我们就要建立

192
00:10:53,790 --> 00:10:56,830
核心域和非核心域的概念

193
00:10:58,090 --> 00:11:01,530
软件里面封装了很多知识

194
00:11:02,110 --> 00:11:07,750
其中有一个知识领域是不可丢弃的

195
00:11:08,490 --> 00:11:09,840
这种我们叫核心域

196
00:11:11,740 --> 00:11:13,610
比如说,你做一个文档处理器

197
00:11:15,460 --> 00:11:16,290
什么是核心域

198
00:11:17,430 --> 00:11:18,700
文档、页

199
00:11:19,200 --> 00:11:23,070
行、字,这些东西你不能丢的

200
00:11:24,580 --> 00:11:26,740
你丢了,你这个软件叫文档处理器

201
00:11:26,750 --> 00:11:27,940
就没有了

202
00:11:27,950 --> 00:11:29,370
没有意义了

203
00:11:31,830 --> 00:11:33,850
而有一些是可以丢的,可以替换的

204
00:11:33,860 --> 00:11:34,770
比如说像这些

205
00:11:35,810 --> 00:11:36,790
比如说Word里面

206
00:11:36,800 --> 00:11:45,670
它用的是MFC来做Word软件

207
00:11:46,390 --> 00:11:47,900
这是MFC里面一些类

208
00:11:47,990 --> 00:11:50,310
比如说,文件对话框

209
00:11:51,550 --> 00:11:52,450
字符串

210
00:11:53,040 --> 00:11:55,330
还有什么XML

211
00:11:56,170 --> 00:11:58,320
这是MFC提供的一些类

212
00:11:59,980 --> 00:12:01,060
而这个是可以替换的

213
00:12:01,760 --> 00:12:04,770
假设你不用MFC这个框架来做

214
00:12:05,800 --> 00:12:07,520
或者说,不用.net框架来做

215
00:12:07,780 --> 00:12:10,000
也许新的版本都是基于.net

216
00:12:10,490 --> 00:12:13,270
你用Java来做可以吗

217
00:12:13,280 --> 00:12:14,110
可以的

218
00:12:14,820 --> 00:12:16,340
但即使你用Java来做

219
00:12:17,280 --> 00:12:18,770
这个是逃不掉的

220
00:12:21,210 --> 00:12:21,840
核心域

221
00:12:22,200 --> 00:12:25,600
同样,你看,电子商务网站,这是核心域

222
00:12:26,630 --> 00:12:27,900
这是非核心域

223
00:12:28,190 --> 00:12:31,680
这可以替换

224
00:12:34,160 --> 00:12:36,020
这个是Java的

225
00:12:36,500 --> 00:12:38,170
你可以换成PHP

你可能感兴趣的:(DDD领域驱动设计,软件工程,架构师,DDD)