4 ms·
I would pick PHP for its intended use, web dev without fat clients. Laravel is the best framework I have ever used…and I have used them all.
by EternalFury 2y ago
I would pick PHP for its intended use, web dev without fat clients. Laravel is the best framework I have ever used…and I have used them all.
- chuckadams 2y agoI write PHP for a living and I only write headless apps with Symfony and Laravel. Blade is an awful template engine with a primitive parser. Twig is tolerable, but for me nothing beats the DX of Inertia with Vue.
- EternalFury 2y agoYou are most likely right. I just fear spreading complexity everywhere. But I also want to take advantage of the vast compute available at clients. So, I am conflicted. Vue is probably a good compromise. Please share your best references on Inertia/Vue.
- chuckadams 2y agoOnly deployments of Inertia I have are internal code I can't readily share, but all it does is replace the very typical pattern of passing json-encoded props to a a blade template that contains a single React/Vue/Svelte component. Now you just return Inertia::render('My/Component', $arr) from your controller or route handler function, and you're good to go. It also has various magic for router links that do partial refreshes and working with classic (non-json) forms and whatnot. I use none of those, I'm all about json and useFetch() instead, and Inertia's pretty good about getting out of your way when you don't need it. It lets you write as much or as little in SPA style as you want, it's more or less your favorite JS framework as a view layer directly without having to interpose another view as a middleman (the middleman is there, but it's all implicit: you add the @inertia directive inside your <div id="app">, and that's it)
- slim 2y agoyou should try API Platform
- chuckadams 2y agoI'm familiar with API Platform, it's the bees knees. Documentation could be better though.