4 ms·
From the point of view of somebody who has been writing front-end code on and off from the late 90s through to present day: There isn’t much understanding of t
by JimDabell 3y ago
From the point of view of somebody who has been writing front-end code on and off from the late 90s through to present day:
There isn’t much understanding of the architecture of the web these days.
People commonly think of web development as a combination of two things: a browser environment in which their JavaScript application runs, and a backend that can provide an API for it to use.
HTML is seen as something that is constructed by JavaScript in the browser. HTTP is just the way you get JSON from the API. URLs are unimportant beyond the desire to make what appears in the browser’s location bar look nice. There’s little understanding of how hypertext is supposed to work.
Tailwind is popular for CSS. People construct their layouts and styles by adding numerous very finely-grained classes to every element in a way that resembles inline styles. There’s very little understanding of how to organise CSS – the most common argument I hear for Tailwind is that it’s impossible to keep CSS organised without it, as if the alternative is to just write one big stylesheet with everything in a mess. “Coming up with names for classes is hard” is something I’ve heard loads.
Graceful degradation / progressive enhancement is now niche. Unobtrusive JavaScript is pretty dead. Fortunately, server-side rendering is making a comeback, but unfortunately most of it relies upon running front-end things on the server with JavaScript as a speedup to bootstrapping the JavaScript running in the browser.
Front-end code is now written in the context of front-end JavaScript frameworks instead of what the browser natively provides. Browsers natively support web components these days, but they were devised by architecture astronauts and are not pleasant or easy to use. Instead people write components with React, Vue, Lit, etc., which have varying degrees of interoperability with web components, which very few people care about. If you want to use a third-party component, you look for one that is written specifically for your framework.
The web platform itself has come a long way though. Browsers almost completely agree on how to render things; CSS layouts are a lot easier and more capable; you don’t need CSS hacks to target workarounds for specific browsers any more; people upgrade their browsers frequently; and even when there are backwards compatibility issues, there are a lot of tools that will transcode it to more compatible older code at build time or polyfill at run time.
If you’re an old-school web developer, you’d probably enjoy writing code with all of the new options available to you. But you’ll probably be quite frustrated when working with newer developers who view the web more like a deployment target for an executable than a real platform with unique strengths.
- Capricorn2481 3y ago> There’s very little understanding of how to organise CSS Was there ever? It seems everyone thinks they have the best way to organize CSS. But it's always just a system that makes sense to them and only them. I'm not convinced there's some enlightened way to organize CSS
- nicoburns 3y agoITCSS and css modules are (or were?) both popular and help quite a bit.
- JimDabell 3y agoThere are multiple way of organising CSS effectively that aren’t specific to single organisations. But my point wasn’t that there is an “enlightened method” that will solve all of your problems, I was pointing out the common misconception that there are only two options: organised CSS with Tailwind or a chaotic free-for-all.
- dontupvoteme 3y agoI think css must be the worst invention in computing, at least all the obfuscated javascript i know is trying to do something (spy on me), instead css just bloats up 800ms on linkedin into the size of war and peace because of how much they throw their weird 6 character psuedohashes in (WHY)
- holoduke 3y agoA bloated linked in has nothing to do with css, but with the company behind it. Everything Microsoft touches is bloated, slow, complex, but somewhat functional enough that common people use it. Tech people hate it in most cases.
- yakshaving_jgt 3y agoYou should turn this comment into a blog post.