821 Followers
216 Following
2.4K Posts

founder of bear.community

bear, geek, loves games, fantasy books, manga, anime and rpdr

also a furry

Pronounhttps://pronoun.is/he
@Jordan I'm not against it!
the "glue-code" was to be aware of the turbo-frame header on the request. If present, then we only render the frame needed for the request and ignore the rest of the html surrounding it. Since I'm stitching together a number of libraries on Clojure, this one was on me... but I saw some libraries for Python environments that do the same
Phoenix has something similar, but it works over websockets. Hotwire just intercepts regular http requests, which I prefer

Update on the JS front-end thingy:

I think the rails folks did something fun: hotwire works pretty well in giving the impression of an SPA but with server-side rendering

Since I'm using a clojure stack I had to write some code just so I had to render less than needed when a turbo-frame request shows up, but it wasn't strictly necessary. Most interesting aspect of it is that I was able to develop like an OG web app (productivity up, complexity down) and then plug it later in an afternoon

Felt like wearing sexy underwear today
Long story short, I scrapped everything. Going with good old server side rendering. Should it need an SPA, it can be added later. I feel so much productive now

So I spent some time this morning, yet again, going through the motions of a react stack, then Vue. Both felt too big, the amount of code I'd write was far bigger than the perceived benefits

Then there's (wrapped) webpack, the test stack, bundling and minifying, sometimes transpilation... Half of these tools will be replaced in two years or so. Some already are outdated, but I wanted to cut off time by going to tools I'm already familiar with

@celestial_monarch maybe, for example, Mastodon's logged ui is one of the examples where an SPA fits. I think hotwire and Phoenix's live view convinced me that reacts "solution space" is smaller than it seems
@celestial_monarch I'm more of a back end kind of dude, and a good number of data validations on the front end should also be done redundantly on the backend anyway. I've submitted logic-breaking forms many times just by tweaking js and checking whether the server is doing what it is supposed to
@robdaemon I've worked in many places where senior engineers make smart libraries on top of react (itself already a fairly complex piece). I could never justify the extra layer for the so called "features"