Did we fuck up the internet? part 1
āLearn the fundamentalsā is a common piece of advice given to beginners when starting out. And usually for web pages, itās some form of ālearn HTML, CSS, and JS.ā Those three will never go away, and will outlast any flavor-of-the-month framework (but full disclosure: I actually do tell beginners to learn a flavor-of-the-month framework because itās motivating, itās what gets them hired, and you can still learn the fundamentals at the same time).
But what if the fundamentals⦠arenāt so fundamental? What were to happen if the fundamentals changed?
Iāve never written a āwas the internet a mistake?ā blog post (itās either a cheap laughāāweāre monkeys that tricked rocks to think; we deserve what we get! ha haāāor a bit melodramatic). But I guess 2020 is the year I start.
backstory: why Iām questioning the web
When I say Iām questioning the fundamentals of the web, I basically mean the HTML/CSS/JS + browsers combo. Or at least this current version of it. Part 1 (this post) will outline what led to this. The following parts will try and soothsay a little.
the Mozilla layoffs
Our journey begins with Mozilla laying off 25% of its staff in August 2020. Software layoffs suck in general, but they really suck when they carry global impact. An extreme (but possible) take on the outcome is: this is the death of Firefox and MDN as we know it (Rust may be OK).
If Firefox goes, then the burden of the internet rests practically on the shoulders of Chromium (if youāre reading this in the far future, remember that Microsoft recently abandoned their historic browser project in favor of Chromium).
At worst, such monopolistic control over the internet is so dangerous it had to be held in check by a 2001 Supreme Court ruling. At best, the responsibility of stewarding the development of the entire internet is so monumental, it crushes any mere team of mortals tasked with it. Either way, if Chromium is the last browser standing, itās bad news for all.
Do you think the web has almost āpriced itself out of the marketā in terms of complexity if only 1-2 organisations are capable of building rendering engines for it?
Microsoft gave up, Mozilla will struggle as you say.
I guess thereās WebKit still š¤·āāļø. Until Apple remembers theyāre supposed to maintain it.
maybe JS isnāt the answer
We pause there, and join the developer discussion in another part of the dev sphere, where people (like myself) are having existential career questions. Second-guessing the modern web by Tom MacWright comes to mind as a post at the center of the discussion around whether or not our current JS-heavy trajectory is healthy.
JS has always had nay-sayers. JavaScript fatigue had been questioning this direction since 2015. And there have been no shortage of the āget off my lawnā old guard complaining about any attempt at replacing jQuery (link). However, MacWrightās post came across as a concerned insider rather than an outside detractor that even got the React folk thinking (and yes, thereās a world of difference between the two).
Iād wager that if React is under question, the larger JS direction (React + webpack, built by Node.js) is under question by extension. Of course they arenāt the same thing, but nothing has come close to Reactās popularity and staying power for the web (especially when you factor in React Native and other targets). If React goes, thereās no clear replacement, which means further splintering.
In rough chronological order, here are a few notable discussions/milestones that amount to some key players in tech all rethinking reliance in JS:
- 2019: Web Components gain widespread browser support, and are basically standardized React components, but devs donāt like them
- 2019ā2020: websites are over 2MB and getting bigger thanks to more JS
- Apr 2020: a pretty damning study of JS frameworks comes out
- May 2020: Tom Wrightās Second-guessing the modern web post
our tools are (still) fractured
From time to time we all need to step outside our bubbles (JS, Rails, PHP, etc.) and be reminded that the web development community is (still) fractured. HTML, CSS, and JS are inadequate in their current form, so we turn to ellaborate tools to fill in their shortcomings.
We canāt simply write HTML, so we turn to template languages: Nunjucks, Jinja, Handlebars, Pug, and Liquid, to name only a few (there are dozens and dozens I missed). But to compile these non-standard templates, we need a compiler thatās likely built in Ruby, Node.js, Go, Python, or Rust, depending on our choices (and the language used has sweeping consequences).
Or perhaps you need to generate markup dynamically, in which case youāll need a server. Again youāll have to pick a language (Ruby, Node.js, Go, PHP, Python, or Rust) as well as a framework (Rails, Nest.js, Django, Laravel, Rocket, etc.). Your choice here will have further sweeping consequences.
And then thereās writing JS, which may or may not get types (TypeScript), and which will likely be built in a framework (Svelte, React, Vue, Angular, etc.). All of these choices will require setting up tooling (webpack / Rollup / Snowpack), as well as the connection to the server from your earlier choices.
By now, weāve been divided and subdivided and subdivided again by our choices. I want to be clear: Iām not at all advocating that we need to use one programming language for anything, or that different problems need different solutions. But I am wondering why, if webpages are supposed to be a standardized concept, there are so many splintered ways to assemble them that I fear weāre losing knowledge (and people) in between the gaps.
There shouldnāt be so many ways to do one standard thing.
where do we go from here?
To recap, Iām questioning current webdev practices because:
- we might be back to a browser monopoly again
- all of us hate writing HTML/CSS/JS so much we invent new ways every year to avoid it
- React + Node.js bundlers are cool but didnāt live up to promises
- our savior, web components, wasnāt received well (also worth mentioning it was championed by our Chromium overlords so weāll see if they ever do anything nice for us again)
All signs that cast doubt on our current direction. But even though the future is uncertain and thereās no clear answer to how we solve all this, we can still make some intelligent bets. So in part 2, weāll do exactly that.