A Rant about Front-end Development - eviltoast

A masterful rant about the shit state of the web from a front-end dev perspective

There’s a disconcerting number of front-end developers out there who act like it wasn’t possible to generate HTML on a server prior to 2010. They talk about SSR only in the context of Node.js and seem to have no clue that people started working on this problem when season 5 of Seinfeld was on air2.

Server-side rendering was not invented with Node. What Node brought to the table was the convenience of writing your shitty div soup in the very same language that was invented in 10 days for the sole purpose of pissing off Java devs everywhere.

Server-side rendering means it’s rendered on the fucking server. You can do that with PHP, ASP, JSP, Ruby, Python, Perl, CGI, and hell, R. You can server-side render a page in Lua if you want.

  • V0ldek@awful.systems
    link
    fedilink
    English
    arrow-up
    1
    ·
    5 months ago

    I’m a backend developer and jesus fucking christ, 500KB? That’s around the weight of code in an actual programming language for a mid-sized project, and front-end needs that much just for CSS? And CSS isn’t even that verbose.

    The whole Rust compiler is like 10MB and that’s a huge codebase, including all the documentation and shit.

    One more reason front-end work never clicked with me I guess

    • paceaux@awful.systems
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      5 months ago

      Yeah. That’s one of the many reasons I wrote a damned rant about how fed up I am with front-end. It’s insane to think web sites telling you about cars or coffee need 1MB+ to do so.

      But it happens because front-end tooling makes it so fucking easy to write complicated, bloated code.

      Most of my time and energy these days is deleting shit. I delete more than I write. But my proudest achievement was like 7 years ago when I was asked to add a Japanese font.

      Took me 6 weeks. I deleted like 15% of the CSS in the process.

      Why did it take so long, and why did it require deleting 15% of the code?

      Because the dorks on the project used Sass for literally every line. So I had like 400+ instances of someone applying a font-family spread across 80 Sass files. Not a single.fucking.HTML.element received a style. Not. One.

      There was no font-family declared anywhere that it could be inherited down.

      So over three sprints I had to move the font-declarations into mixins, then onto raw elements, then actually delete the mixins on the classes. Eventually I got it down to like 18 instances of declaring the font family.

      and then I wrote another 18 instances where I could apply the Japanese font.

      Adding a Japanese font reduced the size of the CSS by 15%.

      front-end work doesn’t click with most front-end devs, either.