5 ms·
The complexity of frontend development now makes me want to return to a “back to basics” approach. I just want a server side rendered platform, serving template
by Chance-Device 2y ago
The complexity of frontend development now makes me want to return to a “back to basics” approach. I just want a server side rendered platform, serving templated html pages to the client, with minimal JS for interactivity. Most projects don’t really require more than this, and the level of unnecessary complexity that has developed over the whole stack, from devops to backend to frontend, is staggering and obviously more a social artefact than a technical necessity.
- qaq 2y agoThats what I switched for all personal projects: Go + a-h/templ + htmx
- sebazzz 2y agoHonestly, that why I use Blazor. It just keeps simple.
- globular-toast 2y agoIf that's all you need then React was never the right solution. What makes you realise this now? If you're used to React/JSX you'll hate templates, though. Look for a HTML component rendering library instead.
- timc3 2y agoI disagree with hating templates. I am used to both, I find templates are much easier to deal with depending on the templating language.
- RobotToaster 2y agoHe's hardly alone in this, half the SPAs I see could have been pure HTML/CSS.
- woutr_be 2y agoYou might be interested in Astro (https://astro.build/ https://astro.build/), I've build my first project with it, and it's great to somewhat go back to basics, but without needing to set up my own server with templating and tasks for static assets, etc...
- shepherdjerred 2y ago+1, Astro is absolute magic
- napolux 2y agoupvoting astro :) some basics and nothing else to start. then you can go as deep as you want down the rabbit hole :) but it's completely on you
- curtisblaine 2y agoIf you need minimal js, there's no need to use frameworks. I don't understand why we came to think the opposite, but you absolutely don't need state managing, effects and a build chain if your goal is to merely show some content on the web. If you need to write a web application, on the other hand, you absolutely need all these things, because your mutable state will become a mess after a short while, your event handlers will call your components in a thousand tangled ways and you will want to navigate your code and your types using your IDE. But, again, if you just want to show content with minimal javascript, you don't need to worry about that. Leave all that stuff to web application developers, instead of looking at that stuff, concluding it's too complex for you and ranting against it on the Internet. It's not made to solve your problem.
- austin-cheney 2y ago> I don't understand why we came to think the opposite The DOM is scary.
- curtisblaine 2y agoIt is, and, worse, it's mutable. But nobody needs to manipulate it just to put some content on the Web.
- austin-cheney 2y agoYes. 80% of a modern frontend developer is just putting text on screen. All the steps and frameworks involved just tend to be resume padding. That’s unfortunate because back in the day when I started doing this work frontend developers were expected to do more than this.
- krapp 2y agoChildren learned how to use it in the 90s from basic web tutorials and reading source code, it isn't that scary. The real reason is that the web started to become serious business, and that meant javascript had to become a serious language, which led to all of the nonsense it accreted over the years from startups and enterprise. Everyone uses frameworks and compilers and a package manager because a serious language uses frameworks and compilers and a package manager, and all of these look good on a resume.
- zero_shift 2y agoAs the number of replies to a React article rises, the chance of a subthread bemoaning SPAs increases to 1
- 8n4vidtmkvmk 2y agoTBF, React isn't exclusively for SPAs. I use it in my MPA.
- rk06 2y agoSo, like using vue/alpine with a script tag?
- madeofpalk 2y agoI really like React as a server-side templating language.
- williamdclt 2y agoSame. I replaced handlebars with server-side generated JSX (not Next or anything like that, just renderToStaticMarkup) and it’s an infinitely better dev experience than any other templating language I’ve used before (hbs, jinja, django…). I’m getting more and more jaded about React and would rather stick with server side rendered html, but I’d definitely stick with JSX at least.
- pier25 2y agoI don't like JSX but I enjoy how React/Svelte/Vue/etc do code colocation and composition compared to traditional templating systems with partials etc. I've found dotnet with Razor and Blazor to be the exact SSR experience I was looking for. And the performance vs JS is so much better. I did a benchmark recently and got about 7x improvement.