Separate functions from views
There are a lot of views that has logics build into them. This makes testing really hard or slow (because you need to render the whole page and query what you see on the page), apart from that there is no UI testing yet integrated into Gazelle.
By separating the functions from the views, we can render the view by passing the data to it. This will create a kind of Controllers/Views architecture, where a in the controller (or something similar) the data is collected and/or mutated and fed to a view, which handles the rendering.
This is in line in what a lot of popular frameworks do, like Ruby on Rails, Django and Laravel, just to name a few. The most work will probably be in deciding how we want to set up the architecture. When the architecture is right, we can convert to the new architecture file for file.
What are your thoughts?
In an ideal world, this indeed would be how Gazelle would be structured, with the views also going through something like Twig to help avoid parsing exploits. However, given time constraints of the developers, we have not made much progress into coming up with the appropriate architecture on our side, though it continues to be my top very long term goal with gazelle.
Spine has been busy for a long time, working on refactoring gazelle to MVC. This is in progress and happening!