Skip to content

Commit 7d291d6

Browse files
committed
update pic
1 parent 81b12cf commit 7d291d6

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

docs/mvc-ddd/mvc-ddd-en.png

131 KB
Loading

docs/mvc-ddd/mvc-ddd.png

-48.9 KB
Loading

domain-driven-design/go-web/Go_MVC_DDD.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
`MVC``DDD`是后台开发两种流行的分层架构思想,`MVC`(Model-View-Controller)是一种设计模式,主要用于分离用户界面、业务逻辑和数据模型,便于分层解耦,而`DDD`(领域驱动设计)则是一种架构方法论,旨在通过构建业务领域模型来解决复杂系统中的设计和维护难题。
44

5-
在Java领域,很多系统逐渐由`MVC`逐渐转为`DDD`,但在Go、Python、NodeJS等语言,秉持简单高效的理念,`MVC`依然是主流架构。下面基于Go语言来具体探讨下`MVC``DDD`两种目录结构的区别。
5+
在Java领域,很多系统逐渐由`MVC`转为`DDD`,但在Go、Python、NodeJS等领域,秉持简单高效的理念,`MVC`依然是主流架构。下面基于Go语言来具体探讨下`MVC``DDD`两种目录结构的区别。
6+
7+
![](../../docs/mvc-ddd/mvc-ddd.png)
68

79
## MVC 图形结构
810
```c
@@ -78,7 +80,7 @@ gin-order/
7880
---
7981

8082
## Go语言 `DDD` 目录结构
81-
DD主要分为四层:界面、应用、领域、基础。
83+
DDD主要分为四层:界面、应用、领域、基础。
8284
```bash
8385
go-web/
8486
│── cmd/

domain-driven-design/go-web/Go_MVC_DDD_en.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
In the `Java` ecosystem, many systems have gradually shifted from MVC to DDD. However, in languages such as `Go`, `Python`, and `NodeJS`—where simplicity and efficiency are prioritized—MVC remains the mainstream architecture. Below, we explore the differences in directory structures between MVC and DDD using Go as an example.
66

7+
![](../../docs/mvc-ddd/mvc-ddd-en.png)
8+
79
## MVC Diagram Structure
810
```c
911
+------------------+

0 commit comments

Comments
 (0)