当前位置:网站首页>以小见大:一个领域建模的简单示例,理解“领域驱动”。
以小见大:一个领域建模的简单示例,理解“领域驱动”。
2022-06-22 15:36:00 【dotNET跨平台】

背景:航空公司为了确保飞行路线不发生冲突,需要开发一款飞行路线管理软件。
过程:我们先去找这个领域的专家,自然是作为平时管理和维护机场飞行秩序的工作人员;我们第一个目标就是与他们沟通,也许我们并不能从中获取所有想要的知识,但至少可以筛选出主要的内容和元素。你可能会听到诸如“起飞”,“着陆”,“飞行冲突”,“延误”等领域名词。
建模:我们开始建模,从一个简单的模型示例开始:
起点->飞机->终点
这个模型很直接,我们可以继续优化,起点和终点 两个领域名词都是某个具体的地点。
优化后的模型:
飞机 -> 地点(含起点和终点)
飞机飞行的起点和终点 成对出现,起点和终点构成一条飞行路线。
继续优化模型:
飞机->路线->地点(含起点和终点)
这样我们就得到3个基本的领域对象:飞机 路线 地点。
我们可以看出领域建模就是通过与领域专家沟通,从中提炼必要的领域元素,不断优化领域模型,建立领域知识的过程。
边栏推荐
猜你喜欢

短视频源码开发,优质的短视频源码需要做好哪几点?

Linux system maintenance: mysql8.0.13 source code download and installation "fool" operation steps (Linux centos6.8) test available series

【微信小程序获取自定义tabbar的高度】绝对可用!!!

Jsp Learning (2) - - jsp script Elements and instructions

【微信小程序封装底部弹出框二】

STM32 ADC acquisition via DMA (HAL Library)

Short video source code development, high-quality short video source code need to do what?

UI自动化定位利器-xpath实战

Partage de l'architecture du système de paiement du Groupe letv pour traiter 100 000 commandes simultanées élevées par seconde

0基础如何入门软件测试,能转行成功吗?
随机推荐
短视频源码开发,优质的短视频源码需要做好哪几点?
Qt笔记-QMap自定义键(key)
How to add a "security lock" to the mobile office of government and enterprises?
企业级软件开发新模式:低代码
for..of vs. for..in 语句
华为云招募工业智能领域合作伙伴,强力扶持+商业变现
mysql账号增删改、数据导入导出命令举例
How to open an account in flush? Is it safe to open an account online?
联合主键引发的思考
试用了多款报表工具,终于找到了基于.Net 6开发的一个了
What are the characteristics of the interactive whiteboard? Function introduction of electronic whiteboard
Oracle database and table
MYSQL 存储过程异常处理 报错 错误代码: 1337
In the era of video explosion, who is supporting the high-speed operation of video ecological network?
Why buy increased life insurance? Is increased life insurance safe and reliable?
Short video source code development, high-quality short video source code need to do what?
[pop up box 2 at the bottom of wechat applet package]
[deep anatomy of C language] keywords if & else & bool type
mysql5.7.27安装之windows8.1 64
你管这破玩意儿叫高可用?