Comments (5)
但其实有一个问题,怎么定义 domain model,这个在每个项目中的实践都不一样,感觉很难通过工具标准化扫描
from archguard.
有一种方式可以,就是通过自定义规则来进行匹配,类似于 ArchUnit 的方式。只是,在微服务架构下,Core Domain 其实应该是一个服务
from archguard.
我们是通过制定工程架构规范,例如阿里的cola、张逸DDD案例,通过stereotype或基类组件,标记领域模型元素(限界上下文、聚合根、实体、领域事件等),静态代码分析出这些领域模型元素
from archguard.
如果参考 DDD 可以这样:
- 分析依赖。
- 如果依赖只包含标准库,和自定义库。就标记为领域的类。(领域的类不应该被其它基础设施依赖)
- 如果依赖包含三方库(redis/kafka/mysql)就标记为基础设施。
- 应用入口/作为用户界面层。包含特定的conroller 或者 model。
- 其它都作为应用层。
按照 DDD 这样就可以分开,同时评估基础设施层和应用层的复杂度。
重构的方向是把应用层/基础设施的逻辑反转向领域层,降低应用层和基础设施层的复杂度。
from archguard.
嗯 ,现在就是类似的方式来分析的,不过 DDD 有多种方式,模块化 DDD + 分层 DDD。 @DoubleDuckDuck 在设计
from archguard.
Related Issues (20)
- Gradle plugin for CLI HOT 1
- 扫描 TypeScript 时,Scanner 出错 HOT 1
- Refactoring Scanner2 Domain package
- Invalid or corrupt jarfile scanner_cli.jar HOT 14
- columns in GROUP BY clause HOT 2
- 没有“依赖分析” HOT 2
- docker-compose 启动archguard-backend报错
- Why still error happened when i changed the mysql address to ip? HOT 1
- 您好,能够出一份详细的使用视频教程? HOT 4
- database-map页面引用错误 HOT 2
- error when scanning :Unauthorized: 401 Unauthorized: "{"code":"unauthorized","message":"unauthorized access"}"] with root cause299936 HOT 1
- error when sca-dependencies in windows for Illegal character in query at index HOT 1
- 你好,未来是否支持添加关联功能自动生成单元测试、集成测试用例提高测试覆盖率的功能 HOT 1
- 公司不支持用户名密码登录,当前gitlab系统关闭basic密码认证访问,仅支持ssh key和personal accesstoken方式访问gitlab上项目,其中token身份验证为https方式访问,这种怎么提交系统扫描基本信息 HOT 1
- Return 500 when clicking search button in '趋势与订阅' HOT 2
- error :org.archguard.scanner.ctl.client.ArchGuardHttpClient.saveGitLogs HOT 4
- Scanner Cli not capturing comments at class level and function level HOT 8
- 关于 analyser_diff_changes-2.1.4-all.jar 的使用问题 HOT 3
- Archguardb部署之后扫描项目失败-日志显示两个错误 HOT 2
- About the Architecture Indicators ,where could I find the logic impletement source? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from archguard.