Changes
Page history
Create Guidelines
authored
Feb 14, 2023
by
Timur Oberhuber
Show whitespace changes
Inline
Side-by-side
Guidelines.md
0 → 100644
View page @
301d4a7e
## Where to put code
We have the following conventions for deciding when to put code in a
`Controller`
/
`Service`
/helper method:
-
A small number of lines can go directly into the controller method.
-
When a controller method does multiple things or becomes too long it should be split into helper methods.
-
When code is duplicated or can be reused it should be moved from the controller to a service.
-
Data retrieval from the database in implemented in the repository class unless it can not be done with simple queries or queryDSL anymore.
\ No newline at end of file