jhipster / generator-jhipster

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
https://www.jhipster.tech
Apache License 2.0
21.53k stars 4.02k forks source link

Separate form and entity definition #19022

Closed SpiralUp closed 8 months ago

SpiralUp commented 2 years ago
Overview of the feature request

Change the JHipster generator to define entities and forms separately.

Motivation for or Use Case

This will enable us to better control which fields should be displayed, which controls are used to display fields, the order of fields, parent-child links between forms, form templates, etc. A form can consist of several related components (subforms) that define the layout of the screen and components that display data from related entities.

The form definition can be added to a project through a special JDL like language or through a separate visual design tool.

I have prepared a small presentation with pictures from my initial implementation: OneDrive link to a pptx presentation.

Related issues or PR
atomfrede commented 2 years ago

This looks really cool, but I am not sure this would be too much for the core generator. I could think of a custom sub generator which generates forms (for an entity) either by q&a or via some external file/definition. With this it would be independent from the standard crud entity generator. So eventually the forms could be a dedicated menu item in the generated ui, but I am not sure this is the way you would like to see such feature integrated.

SpiralUp commented 2 years ago

If needed, I can present how I implemented it and how it works. With the current version of the generator it works perfectly fine. Of course, the question is whether this is the direction in which you would like to go, but I have found this to be useful in practice.

JeroenAdam commented 1 year ago

There is also an ongoing issue https://github.com/jhipster/generator-jhipster/issues/17926 on the React side, multi-column forms don't work. Workaround as proposed is to use the library (Reactstrap) directly as its already integrated and will work seamlessly.

So there is much room for improvement, especially to get quickly started with forms.

SpiralUp commented 1 year ago

I've previously implemented a version of JHipster that separates forms and entities for version 7.9.2. Adapting this for JHipster 8 will necessitate some restructuring. I'd be glad to contribute to this effort and discuss the optimal way forward.

github-actions[bot] commented 8 months ago

This issue is stale because it has been open for too long without any activity. Due to the moving nature of jhipster generated application, bugs can become invalid. If this issue still applies please comment otherwise it will be closed in 7 days