by OtomotO · 2y ago · 0 comments
It's a blast. It's faster and way more resilient. No more state desync between frontend and backend.
I admit there is a minimum of javascript (currently a few hundred lines) for convenience.
I'll add a bit more to add the illusion this is still a SPA.
I'll kill about 40k lines of React that way and about 20k lines of Kotlin.
I'll have to rewrite about 30k lines of backend code though.
Still, I love it.
But if your site works fast. Loads fast. With _a little_ JS that actually improves the functionality+usability in? I think that's completely fine. Minimal JS for the win.
I want the basic functionality to work without JS.
But we have a working application and users are not hating it and used to it.
We rely on modals heavily. And for that I added (custom) JS. It's way simpler than alternatives and some things we do are not even possible without JS/WASM (via JS apis to manipulate the DOM) today.
I am pragmatic.
But as you mentioned it, personally I also use NoScript a lot and if a site refuses to load without JS it's a hard sell to me if I don't know it already.
In a huge majority of cases I come across that is on the server. Some things really are client-side only though, think temporary state responding to user interactions.
Either way I also try really hard to make sure the UI is at least functional without JS. There are times that isn't possible, but those are pretty rare in my experience.
1. filtering a drop down list by typing rather than scrolling through lots of options to pick one 2. Rearranging items with drag and drop
The excessive stuff is requiring a whole lot of scripts and resources to load before you display a simple page of information.