Giter Club home page Giter Club logo

Comments (5)

isixline avatar isixline commented on June 28, 2024

但其实有一个问题,怎么定义 domain model,这个在每个项目中的实践都不一样,感觉很难通过工具标准化扫描

from archguard.

phodal avatar phodal commented on June 28, 2024

有一种方式可以,就是通过自定义规则来进行匹配,类似于 ArchUnit 的方式。只是,在微服务架构下,Core Domain 其实应该是一个服务

from archguard.

duguyixiaono1 avatar duguyixiaono1 commented on June 28, 2024

我们是通过制定工程架构规范,例如阿里的cola、张逸DDD案例,通过stereotype或基类组件,标记领域模型元素(限界上下文、聚合根、实体、领域事件等),静态代码分析出这些领域模型元素

from archguard.

wizardbyron avatar wizardbyron commented on June 28, 2024

如果参考 DDD 可以这样:

  1. 分析依赖。
  2. 如果依赖只包含标准库,和自定义库。就标记为领域的类。(领域的类不应该被其它基础设施依赖)
  3. 如果依赖包含三方库(redis/kafka/mysql)就标记为基础设施。
  4. 应用入口/作为用户界面层。包含特定的conroller 或者 model。
  5. 其它都作为应用层。

按照 DDD 这样就可以分开,同时评估基础设施层和应用层的复杂度。
重构的方向是把应用层/基础设施的逻辑反转向领域层,降低应用层和基础设施层的复杂度。

from archguard.

phodal avatar phodal commented on June 28, 2024

嗯 ,现在就是类似的方式来分析的,不过 DDD 有多种方式,模块化 DDD + 分层 DDD。 @DoubleDuckDuck 在设计

from archguard.

Related Issues (20)

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.