Ask HN: Are there any non-SPA front end developers left?
11 points| karolinepauls | 5 months ago
We would then break down the demo HTML into templates, which we would render in the backend, and work from there.
There would be JS for interactive components - first Knockout (viewmodels, terrible idea), then React (which would let you separate the state from presentation).
Backend templates + React frontend components was IMO the optimum, as long as your POST handling logic was sensible and data-oriented rather than some OO nightmare (https://wtforms.readthedocs.io/en/3.2.x/fields/#the-field-base-class).
You didn't have to implement the API separately from the frontend to later discover that your frontend developer worked really... fast. And implemented their own understanding of the problem domain. These days, if you're super unlucky, you discover that your frontend has been blessed with some non-standard component wrappers, which wrap components, which wrap components, which wrap... And somehow types in TS docs still have no links, so good luck finding what they mean by TData, especially if TData comes from a different codebase.
tl;dr: The tldr is in the title. I want sanity back :D
gethly|5 months ago
Decoupling back-end logic from front-end logic has just too much positivise and advantages that doing SSR is just so 2000s. JS brought dynamicity into web page rendering a long time ago. With SPA, or maybe even PWA(who really uses these?), you get also decoupling from the server - a data dynamicity, so to speak.
In short, SPA turns a dumb web page into a dynamic and responsive application that can have the look and feel of a desktop program. Web is no longer static and slow but fast and lively.
Nowadays, static HTML is a niche use case for serving web pages. Like a personal blog or corporate website that is static in nature(information there change sparsely) and can be manually typed or compiled via static website builder, like Hugo.
austin-cheney|5 months ago
I don't want to go back to JavaScript for employment so long as its riddled with unnecessary abstraction/dependency nonsense. While I did get tired of solving for the numerous problems that shouldn't exist in the first place I got more tired of insecure peers who were always quick to point fingers. I don't have to worry about that any more.
cranberryturkey|5 months ago
Leftium|5 months ago
Try playing Sverdle with JS disabled! https://sveltekit-template.vercel.app/sverdle
> Unlike the original Wordle, Sverdle runs on the server instead of in the browser, making it impossible to cheat. It uses <form> and cookies to submit data, meaning you can even play with JavaScript disabled!
lcnPylGDnU4H9OF|5 months ago
I know you already called it out but there really is something funny about this. The primary reason I recall for node's popularity is that it means you only have to know one language. I guess that's still true...
leakycap|5 months ago
Sanity is available immediately if you are willing to be paid less. There are tons of simple, non-SPA, non-stack-on-stack projects out there, they just usually pay 1/10th the complex stuff.
karolinepauls|5 months ago
Meanwhile the client is telling me is virtually impossible to find frontend devs willing to write HTML.
andrei_says_|5 months ago
Rails for example is SSR by default with a bit of js which speeds up the experience with zero dev effort. Anyone starting a greenfield rails project is spa free by default.
decafninja|5 months ago
I don’t know if that’s still the case.
fzwang|5 months ago
I think there's some recognition that a lot of SPAs didn't need to be SPAs in the first place. At the end of the day, you're just submitting a form for a CRUD app. Good ol' HTML + a sprinkle of JS was enough for most use cases. CSS has evolved to take away some of the stuff that required JS before.
At the moment, I don't think there's really any strong incentives to cut down the complexity of apps by moving away from SPAs. There's real job security in creating complexity. And in some big orgs it's unavoidable. It can change when developers are more aligned with long term outcomes (ex. a product that they own), which usually means smaller projects.
[1] https://htmx.org/
mierz00|5 months ago
trumbitta2|5 months ago