Help! None of my projects want to be SPAs ↦
There’s a lot of wisdom in this post alongside some opinions that I find myself nodding along with:
My strategy for dealing with the absurd pace of change in web development has been as follows: ignore 99% of it and see if it goes away.
While we cover (and talk about) new technologies on a daily basis here at Changelog, that doesn’t mean we adopt everything that hits our radar.
Given the hype cycle, it works pretty well. Mongo isn’t exciting anymore, Angular 1 is dead, CoffeeScript is obsolete, I haven’t heard a word about Meteor since it launched…
These are all specific technologies. But what about the Single Page App pattern in general?
Back in the early days of SPAs, some people argued that it would be faster to only pass the data you need as JSON than to render whole pages. Nearly a decade later, this is almost never true.
He goes on to explain how he’s building a side project SPA-style and all the repercussions of that decision. Really insightful stuff here, please do click through and read for yourself.
Discussion
Sign in or Join to comment or subscribe
Jerod Santo
Bennington, Nebraska
Jerod co-hosts The Changelog, crashes JS Party & takes out the trash (his old code) once in awhile.
2019-02-17T00:52:12Z ago
This pairs nicely with https://changelog.com/posts/why-we-chose-turbolinks
Alexei Sholik
2019-02-17T10:10:21Z ago
Great find!
Sadly, that’s the actual state of things in web development. Both frontend and backend trends are largely driven by hype and marketing campaigns.
I must be getting old but since last year I’ve found myself looking more into the history of computing and learning about the problems software engineers were tackling decades ago. A great way to get a glimpse into that past is to read Turing Award lectures - https://amturing.acm.org/lectures.cfm
Reading those lectures makes your mind operate on a whole different level. They make you realize that there are a lot of hard problems in software still, and arguing, for example, whether
this
in JavaScript should be bound or not in a callback won’t help solve those problems in the slightest.Jerod Santo
Bennington, Nebraska
Jerod co-hosts The Changelog, crashes JS Party & takes out the trash (his old code) once in awhile.
2019-02-18T14:31:50Z ago
Awesome, thanks for linking up those Turing Award lectures! I had never heard of this…
I plan on digging through these and hopefully mining some gold 👏
Joe Rickerby
2019-02-17T18:28:25Z ago
This article sums up my feelings on web frontend and SPAs also. It feels like there’s a huge amount of investment gone into SPAs and Javascript-first apps, so the tooling there is solid and there’s a great developer experience. But that can’t be the only way to build stuff with HTTP and HTML/CSS/JS. Other models that put more weight on the backend have been neglected (is templating still the state of the art?!).
But there’s a feeling you have to get with the program and do the SPA thing.
I think this could be improved though, even under the current model. I believe something like GraphQL can transform datasets server-side to send only exactly what the page needs. And the JS bundle? 36 kb is very respectable, if you were using React it would be 10x that. But only because we’re obsessed with bundling! Back in the day we had these things called ‘shared libraries’ (like glibc) which multiple apps could share. Then your compiled program would contain only the bits that make it special. On the web, every website is delivering their own copy of ReactDom! Put that on a CDN! Give it cache headers! The browser can even cache the parsed code! It would be so much faster! I don’t know why this isn’t the norm.
Jerod Santo
Bennington, Nebraska
Jerod co-hosts The Changelog, crashes JS Party & takes out the trash (his old code) once in awhile.
2019-02-18T14:42:30Z ago
We used to do this back in the day with jQuery served from a shared/public CDN, but that practice has mostly fallen by the wayside.