This looks really nice. I will follow closely, and feel free to poke me here or on Slack if you want an external eye.
I did not reply on the UX topic because this was not my announcement at the time, and I honestly no longer have any desire to deal with other people’s promises, features, code, or bugs.
To share my two cents: I built a prototype some time ago, roughly in the same direction as what you have now. It worked in about 95% of the cases, but things started to break down as soon as partial rendering was involved. Meaning Live Components, Stimulus, or Turbo. A shame 😅
(It technically worked, but either performance was not great, or caching was no longer possible, or caching was possible but then the parent page could not be cached anymore, and so on)
This is something we had already more or less observed when discussing this topic with Kocal.
I am not sure there is an easy answer that would work equally well for this 'all in one' technique and for more traditional templates and asset pipelines.
One genuine question though, because I know how quickly this can grow with components: did you benchmark your solution against the current approach?
To be completely fair, I am now convinced that the only solid approach would be to precompile and dispatch the files to where they actually belong.
In the end, even from a DX perspective, I am not sure this really holds up. HTML, CSS, JS, and Twig are fine, but PHP classes feel awkward in this setup. That very quickly raises questions around namespaces, loading, releases, and long-term maintenance.
Let’s see where you take this 😄
This looks really nice. I will follow closely, and feel free to poke me here or on Slack if you want an external eye.
I did not reply on the UX topic because this was not my announcement at the time, and I honestly no longer have any desire to deal with other people’s promises, features, code, or bugs.
To share my two cents: I built a prototype some time ago, roughly in the same direction as what you have now. It worked in about 95% of the cases, but things started to break down as soon as partial rendering was involved. Meaning Live Components, Stimulus, or Turbo. A shame 😅
(It technically worked, but either performance was not great, or caching was no longer possible, or caching was possible but then the parent page could not be cached anymore, and so on)
This is something we had already more or less observed when discussing this topic with Kocal.
I am not sure there is an easy answer that would work equally well for this 'all in one' technique and for more traditional templates and asset pipelines.
One genuine question though, because I know how quickly this can grow with components: did you benchmark your solution against the current approach?
To be completely fair, I am now convinced that the only solid approach would be to precompile and dispatch the files to where they actually belong.
In the end, even from a DX perspective, I am not sure this really holds up. HTML, CSS, JS, and Twig are fine, but PHP classes feel awkward in this setup. That very quickly raises questions around namespaces, loading, releases, and long-term maintenance.
Let’s see where you take this 😄