Comments (5)
我个人觉得都放。
from cola.
个人觉得,枚举不应该对外,client层和基础层不应使用枚举。枚举应该放在domain层,app层可以通过依赖domain层来使用该枚举。
from cola.
个人觉得,枚举不应该对外,client层和基础层不应使用枚举。枚举应该放在domain层,app层可以通过依赖domain层来使用该枚举。
dubbo调用时也不建议用枚举作为参数传递,但是之前做的项目就是每层都要转换,request对象转domain对象,domain对象转po,枚举都要转成String或者Integer, String或者Integer 转换成 枚举 ,还是挺麻烦的
from cola.
枚举一般我们有两个主要用途,业务的辅助逻辑判断和渲染数据时文本转换等,所以domain和app层都会用到,我觉得放在基础实施层的common包中
from cola.
domain层需要的枚举,放在domain层,因为domain层不应依赖于infra层;除此之外的、其它层需要的枚举,放在infra层。
就好像各层都有class一样,认为枚举“放在一起好管理”的这种思路是不合适的。
from cola.
Related Issues (20)
- 各位老师,请问使用cola-archetype-web生成的工程和介绍的有些不一样 HOT 1
- 关于状态机是否可在线更新 HOT 1
- 是否考虑 Go 版本的生成工具 HOT 1
- 正在学习状态机组件,内部流转功能在什么场景下使用? HOT 2
- 一些工具类和全局常量等,比如MD5Utils,JSONUtils,DateUtils,这些放在哪一层module呢? HOT 1
- 怎么保证在分布式场景下,状态机修改状态线程安全呢
- cola开发交流群
- 如何表达领域和子域的关系呢?领域的gateway可以调用子域的gateway吗
- 微信业务之类的第三方介入组件应该放在哪一层 HOT 2
- extension-starter与spring boot 3不兼容 HOT 1
- maven 打包后,执行 jar 包报错 no main manifest attribute, in start/target/start-1.0.0-SNAPSHOT.jar
- cola-component-statemachine 是否支持设置并行节点? HOT 3
- main入口是在start里,只有一个,如果一个领域里的api,consumer,和定时job需要独立部署,怎么办? HOT 3
- 循环依赖 HOT 1
- SpringCloud2022不兼容COLA
- 聚合型Domain Entity应该如何处理持久化? HOT 2
- Extension个人理解的一些局限性的点有不对的请点 HOT 3
- 生成的模块,为啥package命名不带上各自的模块名?比如xxx-app,为啥包的结尾不是xx.xx.xx.app?
- [BUG] 在spring5的一些版本中无法使用@extensions注解
- 关于状态转移builder的疑问 HOT 2
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 cola.