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
Feature/Browse Books #15
base: develop
Are you sure you want to change the base?
Feature/Browse Books #15
Changes from 10 commits
24cc4fe
03d128b
61f57c3
a686809
8c2bb35
8d499ad
136603c
9ca6ace
7b6e697
f371ed5
ae98cf4
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Marrying a framework will bite you down the line one way or the other. Do you know why / options to limit the impact?
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 exactly know what you mean. Can you be a little more specific, please? Is is the single line assignment or is it the way I declared the BooksController class?
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.
Let's imagine that your application grows over time. You end up at some point with pagy in all controllers. At some point, pagy is no longer supported / has some issues and we want to avoid using it. What do we do? We need to either modify all controllers or implement a
pagy
method on the application controller.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.
Nothing to do, just wanted to make a point that dependencies should be as much as possible isolated and not propagated through the codebase.
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.
Totally right about that one. If more that one controller was needed, I would've definitely move it to application controller 👍
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 namespacing with v1 is one way to go about it.
An alternative will be to use custom content-types, have you used that before?
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.
Yes, you're talking about same route responding to both (for example) html and json, right?
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.
no, not really, in the context of jsonapi using links and versioning the api in routes might be tricky.
Large diffs are not rendered by default.