-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: A crud generator inspired by Ruby On Rails scaffolding #18380
WIP: A crud generator inspired by Ruby On Rails scaffolding #18380
Conversation
…ure/netodevel-scaffold-crud-generator
Thanks for your pull request! The title of your pull request does not follow our editorial rules. Could you have a look?
|
Thanks a lot for this work! I am cc'ing @ebullient @maxandersen @ia3andy who are most knowledgeable in this area |
Looks good and interesting; I do though think making this something as part of maven/gradle plugin is not the way forward. Ultimately should be a plugin to quarkus cli. That has the advantage that this wont be dependent on core repository but can be done separately (like quarkus jhipster support is not part of quarkus core). We don't have the plugin mechanism yet but will soon; follow #18408 to know more. |
@@ -42,6 +42,12 @@ | |||
<groupId>io.quarkus</groupId> | |||
<artifactId>quarkus-devtools-codestarts</artifactId> | |||
</dependency> | |||
<!-- Generator Mustache --> | |||
<dependency> | |||
<groupId>com.github.spullara.mustache.java</groupId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a specific reason you don't use qute ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just because I am more familiar with mustache, I have never used qute for this purpose.
really, coupling to the core is not a very good thing. the idea then is this scaffold to be a separate project and use it as a "plugin" to be installed on the cli, right? I just have a counterpoint for us to think about. I've been through this in the spring community. |
basically yes. @netodevel now I don't disagree with you that some devs don't like to have cli's when they just have mvn/gradle plugins...the cool thing is that with the way the cli is made nothing really prevent us from making a quarkus:cli maven and gradle command available. That would be a bit meta and I'm not a superfan of it and there could be a speed penalty but it could be considered. One thing is though a concern I always have with these codegenerators it is that they go stale if not maintained continuously and thats my main reason to want to decouple that from the core quarkus plugins to let them move as fast or slow as they want/are able to. |
@maxandersen, I really see in the future the quarkus site emphasizing the use of cli with generators to make development fun. |
@ebullient @maxandersen @ia3andy, |
@netodevel sorry for the delay - the way forward is you create a repo with a command called quarkus- and make it generate the scaffolding code. then when we (hopefully soon) have quarkus plugin support it becomes easy to integrate it. At this time we don't plan on having a "in-core" scaffolding tool - projects like the one you made here, jhipster, nubesgen and others all are available. If someone standsout as being really fitting we might consider make it the default or extra easy to install, but lets say you make this available in netodvel/jbang-catalog the only thing you would need to do is:
This way you and contributors can grow and build this on top of Quarkus rather than being tied to specific version of quarkus. wdyt? |
As @maxandersen said, I would suggest to give a try to Qute for the templates, it's really nice and easy to use (and it is native compatible). |
I agree, so i will close this pr. |
This is a demonstration of what I'm developing
Attention:
turn down the volume before running the demo.
demo-scaffold-quarkus.mp4
A crud generator inspired by Ruby On Rails scaffolding.
Goal
Automate/generate repetitive daily tasks (or at least the beginning of them) as a simple CRUD.
What I planned for the first version
Crud generator in Java with standard structure (model, service, controller) and tests.
Maven and Gradle support.
commands:
Future
In the future this may go beyond generating crud and also generating initial settings.
Input:
mvn quarkus:config -Dparam="amazon-sqs"
Output:
In the future it will be possible to choose which target language, such as: kotlin.
and control this by some properties files that the generator will consult before executing.
I also see generation of migrations(liquibase,flyway) in the future.
This feature is still on WIP.
I post here to hear opinions about and help me complete this feature as well.
Thanks.