Saturday, June 21, 2025
News PouroverAI
Visit PourOver.AI
No Result
View All Result
  • Home
  • AI Tech
  • Business
  • Blockchain
  • Data Science & ML
  • Cloud & Programming
  • Automation
  • Front-Tech
  • Marketing
  • Home
  • AI Tech
  • Business
  • Blockchain
  • Data Science & ML
  • Cloud & Programming
  • Automation
  • Front-Tech
  • Marketing
News PouroverAI
No Result
View All Result

Kicking the Excessive JavaScript Habit

November 27, 2023
in Front-Tech
Reading Time: 3 mins read
0 0
A A
0
Share on FacebookShare on Twitter


The video of Ryan Townsend’s talk from Performance Now(), The Unbearable Weight of Massive JavaScript is well worth a watch. Excessive JS, seemingly turbo-charged by JS frameworks, has long been a problem on the web, with bundle sizes showing no sign of decreasing.

https://www.youtube.com/watch?v=f5felHJiACE

As Ryan points out, all that JS is rarely in the service of users. Rather, architectural choices are made primarily for developer experience. It seems like few companies question whether they need a JS framework like React. Companies hire for React-and-Typescript, so developers learn those skills, and in turn they want to work with those frameworks because it’s what they know, so they push for those.

One slide in particular stayed with me:

Trickle-down user experience

Yep, that’s it. We convince ourselves that by prioritising the developer experience that we want, we’ll be able to provide a better experience for users. The problem is, it’s just not working out that way. Our stacks are fragile, breakable. The slightest breeze and they come crashing down. Trickle-down user experience works pretty much just as well as trickle-down economics. What users want are fast, accessible, useable websites. We’re just not giving them that.

We’re also making things pretty complicated for ourselves, tying ourselves (and future developers) into an ecosystem of dependency spaghetti, and bending over backwards to re-implement things in JS that the browser gives us for free.

You can count on web standards

It’s refreshing to see a renewed interest in web components in recent weeks — something I confess I still haven’t got around to learning properly. Rather than frameworks which come and go, and require regular love and attention in order to continue working, web standards are designed to be future-proof. And with new features like nesting and cascade layers, it’s becoming easier to write CSS at scale without requiring a build step.

I wouldn’t say there’s no place for JS frameworks, but they could definitely be used a lot less.

HTML first…or is it?

Relatedly, this HTML First manifesto(?) has been doing the rounds. On initial glance, I agree! HTML-first is what web standards people have been advocating for years, right?! And there’s some good ideas in there: Prefer “Vanilla” approaches over frameworks! Avoid build steps!

Where I’m not so sure I agree is on the idea that everything should go in the HTML. And some of the advice feels downright contradictory: the author advocates for libraries like Tailwind and Alpine.js, which do require a build step, at least if you want to ship them in an efficient way, and I’m not sure that using HTML attributes in the way advocated in the example is more understandable. (Side note: Alpine.js bugs me because you end up littering your HTML with invalid attributes.) I’m not die-hard “separation-of-concerns-at-all-costs”, but I thinks there are benefits to separating CSS and JS from HTML on the whole. I’m not convinced that (as the author claims) “it will be easier for other developers to find and understand behaviour, navigate it, and make changes to it”.

The author proclaims that you should be able to right-click to view source and be able to understand the underlying code. Lots of people would agree, but again, I feel that’s a little contradictory when you’re peppering a web page with inline styles and JS. But to be honest, I don’t really care about being able to view source. I know that’s something of an unpopular opinion, but I’ve never found it particularly helpful. We have much better developer tools than 10 years ago, it’s never been easier to debug in the browser. As long as the HTML shipped to the user is valid and accessible, I’m not bothered what looks like underneath. So I understand where people are coming from when they lament the good old “view source” days, but I feel like to build a workflow around that risks once again prioritising developers over users.

I don’t want to dismiss everything in the article though. I love the idea of simplifying how we build for the web, and weaning ourselves of our excessive JavaScript habit. It’ll be interesting to see if some of these ideas catch on.



Source link

Tags: cssExcessivefront endHabitJavascriptKickingweb designweb development
Previous Post

Why Blockchain Matters More Than You Think – Jack Ma, Bill Gates, Elon Musk, Vitalik|Simplilearn

Next Post

China’s Big AI Advantage: Humans

Related Posts

The essential principles of a good homepage
Front-Tech

The essential principles of a good homepage

June 7, 2024
How to measure and improve user retention
Front-Tech

How to measure and improve user retention

June 6, 2024
Push Animation on Grid Items
Front-Tech

Push Animation on Grid Items

June 5, 2024
How to build a Rails API with rate limiting
Front-Tech

How to build a Rails API with rate limiting

June 4, 2024
Introduction to the B.I.A.S. framework
Front-Tech

Introduction to the B.I.A.S. framework

June 3, 2024
Blue Ridge Ruby is exactly what we need
Front-Tech

Blue Ridge Ruby is exactly what we need

June 3, 2024
Next Post
China’s Big AI Advantage: Humans

China’s Big AI Advantage: Humans

Greenpeace accuses China oil and gas firms of ‘greenwashing’ LNG purchases By Reuters

Greenpeace accuses China oil and gas firms of 'greenwashing' LNG purchases By Reuters

Software Engineering vs Cloud Engineering – Which Is Better for Entry Level?

Software Engineering vs Cloud Engineering - Which Is Better for Entry Level?

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • Trending
  • Comments
  • Latest
23 Plagiarism Facts and Statistics to Analyze Latest Trends

23 Plagiarism Facts and Statistics to Analyze Latest Trends

June 4, 2024
Managing PDFs in Node.js with pdf-lib

Managing PDFs in Node.js with pdf-lib

November 16, 2023
How ‘Chain of Thought’ Makes Transformers Smarter

How ‘Chain of Thought’ Makes Transformers Smarter

May 13, 2024
Is C.AI Down? Here Is What To Do Now

Is C.AI Down? Here Is What To Do Now

January 10, 2024
The Importance of Choosing a Reliable Affiliate Network and Why Olavivo is Your Ideal Partner

The Importance of Choosing a Reliable Affiliate Network and Why Olavivo is Your Ideal Partner

October 30, 2023
Best headless UI libraries in React Native

Best headless UI libraries in React Native

September 28, 2023
Can You Guess What Percentage Of Their Wealth The Rich Keep In Cash?

Can You Guess What Percentage Of Their Wealth The Rich Keep In Cash?

June 10, 2024
AI Compared: Which Assistant Is the Best?

AI Compared: Which Assistant Is the Best?

June 10, 2024
How insurance companies can use synthetic data to fight bias

How insurance companies can use synthetic data to fight bias

June 10, 2024
5 SLA metrics you should be monitoring

5 SLA metrics you should be monitoring

June 10, 2024
From Low-Level to High-Level Tasks: Scaling Fine-Tuning with the ANDROIDCONTROL Dataset

From Low-Level to High-Level Tasks: Scaling Fine-Tuning with the ANDROIDCONTROL Dataset

June 10, 2024
UGRO Capital: Targeting to hit milestone of Rs 20,000 cr loan book in 8-10 quarters: Shachindra Nath

UGRO Capital: Targeting to hit milestone of Rs 20,000 cr loan book in 8-10 quarters: Shachindra Nath

June 10, 2024
Facebook Twitter LinkedIn Pinterest RSS
News PouroverAI

The latest news and updates about the AI Technology and Latest Tech Updates around the world... PouroverAI keeps you in the loop.

CATEGORIES

  • AI Technology
  • Automation
  • Blockchain
  • Business
  • Cloud & Programming
  • Data Science & ML
  • Digital Marketing
  • Front-Tech
  • Uncategorized

SITEMAP

  • Disclaimer
  • Privacy Policy
  • DMCA
  • Cookie Privacy Policy
  • Terms and Conditions
  • Contact us

Copyright © 2023 PouroverAI News.
PouroverAI News

No Result
View All Result
  • Home
  • AI Tech
  • Business
  • Blockchain
  • Data Science & ML
  • Cloud & Programming
  • Automation
  • Front-Tech
  • Marketing

Copyright © 2023 PouroverAI News.
PouroverAI News

Welcome Back!

Login to your account below

Forgotten Password? Sign Up

Create New Account!

Fill the forms bellow to register

All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In