Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
My second application tutorial #34401
My second application tutorial #34401
Changes from all commits
774b436
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 14 in docs/src/main/asciidoc/getting-started-dev-services.adoc
GitHub Actions / Linting with Vale
Check warning on line 27 in docs/src/main/asciidoc/getting-started-dev-services.adoc
GitHub Actions / Linting with Vale
Check warning on line 31 in docs/src/main/asciidoc/getting-started-dev-services.adoc
GitHub Actions / Linting with Vale
Check warning on line 31 in docs/src/main/asciidoc/getting-started-dev-services.adoc
GitHub Actions / Linting with Vale
Check warning on line 35 in docs/src/main/asciidoc/getting-started-dev-services.adoc
GitHub Actions / Linting with Vale
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.
Why 'dev-service', shouldn't it be 'crud' ?
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.
or 'rest'
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.
I don't think it could be 'rest', because https://github.com/quarkusio/quarkus-quickstarts/tree/main/getting-started is a rest application. It could be 'crud' ... to me, dev services was the big gap that we didn't have content for, so I named it that way. But you're right that crud is the characteristic feature of the application code, and we do already have https://github.com/quarkusio/quarkus-quickstarts/tree/main/getting-started-reactive-crud/. So I'll rename it that way to be consistent.
There's also overlap between the app and https://github.com/quarkusio/quarkus-quickstarts/tree/main/hibernate-orm-panache-quickstart, but the 'crud' name doesn't make the overlap worse, just more obvious. :) The key difference is that one is designed to be coded by a user and the other is intended to be downloaded on app creation, so I think it's right that they stay separate.
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.
Actually, I think I've changed my mind again.
getting-started-dev-services
seems like the right file name for this article, and then people would expect that the code in the other repo would have the same name as the article.Check warning on line 56 in docs/src/main/asciidoc/getting-started-dev-services.adoc
GitHub Actions / Linting with Vale
Check warning on line 56 in docs/src/main/asciidoc/getting-started-dev-services.adoc
GitHub Actions / Linting with Vale
Check warning on line 67 in docs/src/main/asciidoc/getting-started-dev-services.adoc
GitHub Actions / Linting with Vale
Check warning on line 67 in docs/src/main/asciidoc/getting-started-dev-services.adoc
GitHub Actions / Linting with Vale
Check warning on line 69 in docs/src/main/asciidoc/getting-started-dev-services.adoc
GitHub Actions / Linting with Vale
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.
This is slightly annoying...
As GET must be idempotent, and so should not change the server state.
I would recommend using @post (or having an @post endpoint).
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.
I knooow, but if we use post, it's (a) harder to test and (b) less realistic. No one would expect to do a post to retrieve information, if the information under discussion isn't changed by the request. Many pages store analytics about site traffic to their @get endpoints. Since something somewhere changed, arguably the GET endpoint is changing state. No website ever has said 'we use Google Analytics, so you must use POST to visit our pages.' :)
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.
I guess it's a question of the semantics of what the server state is. It's sort of hard to reason about semantics for an endpoint that just says "hello," because the whole premise doesn't actually have value. But I would argue the 'intended effect' is to say hello, in an idempotent way. The persistence of the name is a traffic-monitoring side effect.
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.
With a POST, you can receive the Greeting directly from the body, and just do
.persist()
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.
Reading a Greeting from the body doesn't feel right. I don't think the user is saying hello to us and sending us a greeting, I think they're asking us to say hello to them. That's more consistent with the original function of the application that we are adapting.
Of course, greetings are peskily symmetrical, so we may never be able to decide which it is.
Would it help if we called the thing we persisted something like else, so it was obvious it would be inappropriate for it to be passed in? Like InteractionLog or something?
Check failure on line 234 in docs/src/main/asciidoc/getting-started-dev-services.adoc
GitHub Actions / Linting with Vale