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.51k stars 4.02k forks source link

Blaze-Persistence support #11947

Closed Mobe91 closed 4 years ago

Mobe91 commented 4 years ago
Overview of the feature request

The goal of this feature request is to add support for blaze-persistence to jhipster. Specifically, the user should be able to

Motivation for or Use Case

DTOs using Blaze-Persistence Entity Views directly map to database queries and allow to only fetch the data that is required for the respective DTO, thereby increasing the efficiency of database access.

Also, Blaze-Persistence offers integrations with Spring WebMVC and Spring Data JPA that allow for effortless keyset pagination.

Related issues or PR
Mobe91 commented 4 years ago

I am prepared to create a PR for this but I would appreciate some guidance (already posted to your gitter chat). As far as I understand this would mostly become a second path along MapStruct so it would not go into a separate jhipster module, right?

atomfrede commented 4 years ago

I don't know how blaze works, but I would say a blueprint would be a good fit (we have not the capacity to maintain it in the main generator). Do you have an example application maybe that shows what needs to be changed?

Mobe91 commented 4 years ago

@atomfrede Examples: Cat WebMVC Controller Cat entity Cat Entity View/DTO Cat repository Apart from the changes to the above artifacts I would also need to make some changes to the DatabaseConfiguration that is currently generated by jhipster + additional dependencies and a new BlazePersistenceConfiguration that defines some beans.

Mobe91 commented 4 years ago

Can you by chance point me to an example of how to create such a blueprint and of how it would be used once created?

mshima commented 4 years ago

Can you by chance point me to an example of how to create such a blueprint

Normally a blueprint is created by copying the generator-jhipster sources, and changing it, but if the changes are simple, you can patch the generated code.

I recommend you to create a sample application, with the required changes in 1 commit and post the link here, so we can take a look.

You can use one of the samples at https://github.com/jhipster/jdl-samples.

how it would be used once created?

Once the blueprint is ready just add blueprints [yourBlueprint] to config section (requires current master), or call jhipster --blueprints yourBlueprint

pascalgrimaud commented 4 years ago

As already mentionned:

we have not the capacity to maintain it in the main generator

So to give a try, you should follow these steps:

Depending on a lot of changes or not, depending on your motivation, you can start to code a module / blueprint. You have a lot of example for that.

Then, you can publish your module and ask feedback from community. If your module is a great success, we can reconsider this.

For now, I'm closing this ticket and it should go to module/blueprint.