美文网首页
DDD for golang- note

DDD for golang- note

作者: robertzhai | 来源:发表于2022-07-31 18:58 被阅读0次

Why DDD?

The following are the reasons to consider using DDD:

Provide principles & patterns to solve difficult problems
Base complex designs on a model of the domain
Initiate a creative collaboration between technical and domain experts to iteratively refine a conceptual model that addresses domain problems.

DDD comprises of 4 Layers

http://dddsample.sourceforge.net/architecture.html

Domain: This is where the domain and business logic of the application is defined.
Infrastructure: This layer consists of everything that exists independently of our application: external libraries, database engines, and so on.
Application: This layer serves as a passage between the domain and the interface layer. The sends the requests from the interface layer to the domain layer, which processes it and returns a response.
Interface: This layer holds everything that interacts with other systems, such as web services, RMI interfaces or web applications, and batch processing frontends.


image.png

layout

image.png image.png
image.png image.png

summary=>4层分层架构

go-ddd-sample分为application、domain、infrastructure、interfaces四层,其中domain定义repository接口,infrastructure层实现该接口,application层通过domain来编排业务逻辑,interfaces层则基于net/http来提供http接口。

image.png image.png

code

https://dev.to/stevensunflash/using-domain-driven-design-ddd-in-golang-3ee5
https://github.com/victorsteven/food-app-server

ref

https://segmentfault.com/a/1190000039397677
https://blog.csdn.net/hello_ejb3/article/details/115106619
https://github.com/takashabe/go-ddd-sample

相关文章

  • DDD for golang- note

    Why DDD? The following are the reasons to consider using ...

  • DDD NOTE

    《领域驱动设计》一书是领域模型领域的代表作,被很多牛人推荐,其中的概念还需要在思考和实践中逐步理解。书中描述的一些...

  • MarkDown

    ###fff ..aa..... ddd ddd ddd ddd ddddddasdf

  • test1

    *title* dddd ddd ddd ddd

  • go 变量声明初始化、new、make

    title: go 变量声明初始化、new、makedate: 2019-01-04tags:- golang- ...

  • 第一节 DDD相关概念

    什么是DDD DDD相关概念 1.1什么是DDD 领域驱动设计,即Domain Driven Design(DDD...

  • 2018-02-09

    # aaa ## aaa ### ddd ddd

  • XML之XPath

    /AAA/AAA/CCC/AAA/DDD/BBB //BBB//DDD/BBB /AAA/CCC/DDD/*/*/...

  • DDD领域驱动设计浅见

    目录 DDD简介DDD是啥DDD能给微服务带来什么不用DDD的常见设计方式DDD整洁架构常见三层架构设计整洁架构D...

  • 无标题文章

    DDD## WAD-- 2.2323 ddgoogle ddd ddd fff 11 22 22 33 *简书ht...

网友评论

      本文标题:DDD for golang- note

      本文链接:https://www.haomeiwen.com/subject/qeokwrtx.html