I am new to Grails. I have noticed that most tutorials show queries being created and stored in the Controller. It seems like this could really bloat the controller over time, especially as queries grow in greater number and complexity.
In my research, I read that controllers should stay as lean as possible (having to do with requesting and submitting data to/from the model/view, and that heavy querying is discouraged.
How have you gone about creating, storing, and calling queries for your Grails application?
There’s a good article about Grails best practices here. According to the post:
So if you have a more complex logic, I suggest you to build services: