Git Product home page Git Product logo

kk-ddd's Introduction

项目组成

  • 根项目:root
  • 组件支持:support
  • 任务中心:job-center
  • 用户服务:user
  • 促销服务:sales

服务架构

domain模块

核心业务逻辑的集中地,包含有状态的Entity、领域服务DomainService、以及Infrastructure模块的接口类。

纯POJO模块,不依赖项目内其他模块,仅引用types模块。

基于CQRS架构,将领域服务模型拆分为CommandService(写操作)和QueryService(读操作)。

application模块

包含ApplicationService,不涉及任何业务逻辑,职责仅仅是组件编排,入参为Query(查询操作),Command(写操作,返回执行结果),Event(已发生事件响应,通常是写操作,不返回结果)等Entity,出参为DTO。

纯POJO模块,直接引用domain模块和models模块。

infrastructure模块

基础设施层,包括Persistence、Messaging、External等领域层接口的具体实现,是领域层与外部的媒介,属于变更频次最低的模块。

直接引用domain模块和dependencies模块以及其他外部框架。

web(或interface)模块

对外接口层,也属于基础设施层的一部分,web项目,包含Controller、Provider、Scheduler、MessageListener等,不涉及任何业务相关的代码,职责是服务提供、协议转化、统一鉴权、会话管理、服务限流、异常处理、日志记录等。

直接引用application模块作为服务提供,infrastructure模块通过依赖注入作为服务实现,对domain模块应该是不可知的。

图示

模块结构图

Repository体系类结构图

kk-ddd's People

Contributors

kingkh1995 avatar

Forkers

suevip1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.