I'm assessing Craft's suitability for my next project, coming from using HMVC in CodeIgniter with a custom CMS.
In CI all requests go via a controller action which is responsible for inspecting request parameters, loading and filtering data and passing that data to a view. Pretty typical MVC.
From what I've seen so far of Craft and plugins developed for it, the requests are typically forwarded directly to Twig templates and those templates are responsible for analysing query strings and request data and fetching data from exposed template variables or built in "entries".
I'm thinking of a use case where data would need to be displayed and filtered by query string and session criteria and it strikes me that the template would be handling too much of this logic and become bloated.
Most of the website I will be developing will get its data in JSON format from a REST API and passing filter criteria from user interaction with forms and UI controls will come up a lot.
My question is, is this a typical and recommended approach to using Craft, or should I be using controllers to handle tasks such as filtering and fetching data and passing it to a view?
Are there any plugins that I could look at for reference that could help me to understand the flow and process?
Thanks
Jamie