简体   繁体   English

没有.jdl 文件和.jhipster 文件夹中的.json 文件的Jhipster 应用程序

[英]Jhipster app with no .jdl file and .json files in .jhipster folder

i am working in an application generated with jhipster and this application has no .jdl file or .json files in .jhipster folder because when a team member wants to add an entity or modify it or something like that, he does this in his own machine in a test project generated with the same version of jhipster, then he copies the generated entity code to the main application.我正在使用 jhipster 生成的应用程序,该应用程序在.jhipster文件夹中没有.jdl文件或.json文件,因为当团队成员想要添加实体或修改它或类似的东西时,他会在自己的机器上执行此操作在使用相同版本的 jhipster 生成的测试项目中,然后他将生成的实体代码复制到主应用程序。

What do you think?你怎么看?
is this a good practice?这是一个好习惯吗?
won't it cause problems later?以后不会出问题吗? (i don't know in the upgrade for example) (例如,我不知道在升级中)
please share your thoughts with me.请与我分享你的想法。

This is a bad practice, it's going to make impossible to run jhipster upgrade and more it does not allow to track changes in git.这是一个不好的做法,它将导致无法运行jhipster upgrade ,而且它不允许跟踪 git 中的更改。 I suppose also you don't use incremental changelogs which is a great feature for evolving your database schema.我想您也不使用增量更改日志,这是发展数据库架构的一个很好的功能。

Copying files from a freshly generated side project is OK if the goal is to cut off any dependencies from JHipster but at least keep track of the JDL in the main git repository so that you can understand how the domain model has evolved and why in the commit messages.如果目标是切断来自 JHipster 的任何依赖项,但至少要跟踪主 git 存储库中的 JDL,那么从新生成的副项目复制文件是可以的,这样您就可以了解域 model 是如何演变的以及为什么在提交中消息。

Also imagine you decide to change few options and re-generate the side project, starting from a JDL is much faster than answering questions.还假设您决定更改几个选项并重新生成副项目,从 JDL 开始比回答问题要快得多。

Also the JDL is documentation of your domain model, either as text or as a picture.此外,JDL 是您的域 model 的文档,可以是文本,也可以是图片。

Please note that there are other approaches to manage custom code versus generated code like what the community calls the "side-by-side approach" .请注意,还有其他方法可以管理自定义代码与生成的代码,例如社区所称的“并行方法”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM