|
|
## 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 |