grdn/estrattonbailey/writing-toy-like-code@1h43fr7

Saw this tweet this morning.

Feb 20, 2022
Interesting how @remix_run is making server-side rendering cool again.JS devs got mocked for "not using servers" but it reveals is how insufficient traditional server-side frameworks have been to create great UIs.It’s not that we hate SSR. But it wasn’t that great until now.

Gross generalization: it's interesting how we went from server-rendered sites with JS sprinkled in (RIP in peace jQuery, or maybe not), to SPAs, and then back to server-rendering with stuff like Next, Nuxt, etc.

Was this entirely motivated by making developer experience (DX) easier?

I.e. demand for advanced frontend interactions precipitated React et al. React precipitated boilerplates and SPA frameworks, which made it easier to work with. SEO requirements and the difficulty of writing isomorphic React applications precipitated Next.js et al. And now that we've realised SSR isn't so bad, we're back to server-rendering and islands architectures in full framework form, like Remix and Sveltekit.

"Islands architecture" isn't new, it what we did before we had all these other options. But it was pretty manual up until now. And maybe that's the real lesson here.

I'm not sure how to phrase it. It's essentially: for a new pattern to be adopted, it needs to gloss over problems and make them trivial to address. For a paradigm shift to be successful, it needs to feel like a toy.

There is a spectrum of ways to solve the problems that frameworks like Remix solve. It goes from compose-many-libraries-with-disparate-APIs-into-a-cohesive-system → simply-install-Remix. It's obvious which one most people are going to choose.

For library and framework authors, here's another way to put it:

Feb 17, 2022
My dad is an audiophile. He loves speakers. He doesn't listen to music, he listens to speakers. The speakers are the product.It seems a lot of developers are like that. The website/app doesn't matter, it's the code and tech they get to use to build it that matters.

I'm definitely guilty of thinking more about the tech when writing libraries, and less about "will the average person grok this and know what to do with it."

I need to start writing code that's more toy-like if I want people to use it. Good goal for 2022 I suppose.