So i return to PHP practice and unfortunately fall into a habit of writing a page or form response src like i did in 2019, one script inside html, and the script does both PDO to get data and uses that data in the render of html.

Later in my regular doomscrolling on Twitter I find this screenshot of a presentation slide that has started a big conversation, the slide depicts a React component in Next.js that does exactly what my quick fix php does, access data and render in the same script, only all in JS. And the upshot of the conversation is this, these backend frontend scripts aren’t following best practices for architecture, e.g. MVC.

So, mission accepted, no more quick fix scripts, and time for me to work on a real MVC project and see it through, unlike in 2021 where I thought I could create an MVC SPA without using any frameworks, just JS libraries Node and jQuery.