Home > Software engineering >  Jhipster app with no .jdl file and .json files in .jhipster folder
Jhipster app with no .jdl file and .json files in .jhipster folder

Time:08-18

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.

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.

CodePudding user response:

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. 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.

Also imagine you decide to change few options and re-generate the side project, starting from a JDL is much faster than answering questions.

Also the JDL is documentation of your domain model, either as text or as a picture.

Please note that there are other approaches to manage custom code versus generated code like what the community calls the "side-by-side approach".

  • Related