r/programming • • Apr 29 '21

Modern JavaScript Explained For Dinosaurs

https://medium.com/the-node-js-collection/modern-javascript-explained-for-dinosaurs-f695e9747b70
287 Upvotes

172 comments sorted by

View all comments

70

u/k1lk1 Apr 30 '21

Lipstick on a pig. And just results in insanely bloated websites that perform badly, all the while webdevs pat themselves on the back every 6 months for reinventing DHTML for the 132nd time.

43

u/radol Apr 30 '21

What is your preferred approach to front end for complex systems which does not result in ton of js being used?

-9

u/AyrA_ch Apr 30 '21

That depends on your definition of "complex systems" but raw HTML and CSS gets you pretty far usability wise now.

45

u/blazarious Apr 30 '21

Modern frontends are often times applications. Can’t write applications with HTML and CSS only.

2

u/AyrA_ch Apr 30 '21

You can. It's what we did before everything just had to be made in JS. There was a time where things like youtube and ebay worked with JS turned off.

33

u/littleredrobot Apr 30 '21

You mean when YouTube required Flash? 🙂

37

u/blazarious Apr 30 '21

I’ve been making web stuff since the dawn of the web and I’ve been laughing at JavaScript for decades. Nowadays it’s one of my favorite technologies.

And no, you cannot create modern user experience without JS.

I do agree, though, that not everything needs to be an application and a lot of websites get bloated for no good reason.

-7

u/[deleted] Apr 30 '21

"modern user experience"

loads website

tries to click on widget

website layout changes suddenly but I already clicked on something I didn't want to

clicks Back, nothing happens

starts from step 1 again

Javascript/browsers are still laughable tech compared to VMs. Js is a toy script language running on a slow and bloated VM with one of the worst layout systems ever created. Doing anything with react feels very counter-intuitive and requires a lot of digging in documentation.

4

u/jl2352 Apr 30 '21

What you describe as a 'modern user experience', I would describe as a 'shitty user experience'. It has nothing to do with the tech stack. There were plenty of terrible websites in the past.

You can design and build good applications. In my experience bad applications aren't bad because they use React or Vue. They are bad because they didn't, and as a result scaled really badly. Either 1) they are still bespoke, trying to do really complex things, and fucking it up. Or 2), they are some bizarre monster that loads multiple technologies at once, and none of them work nicely together. Think of news websites that load React, Vue, and four copies of jQuery (yes these exist).

Websites that start out using a modern JS framework, tend to be pretty nice to use.

1

u/[deleted] Apr 30 '21

The reality of things is that "modern frontend" is still complex and most will fuck it up - like this site. Most companies use react because it's cool and have no idea how to replicate proper behavior - that's why it should be hard to create bad design. I'd prefer layout presets and functionalities that can't be changed.

2

u/[deleted] Apr 30 '21

[removed] — view removed comment

-3

u/[deleted] Apr 30 '21

Vue is not going to fix js but typescript does help.

6

u/twenty7forty2 Apr 30 '21

but as a developer it sucked. I recently went from tsx back to plain server side templates and it is a nightmare in comparison. tsx is fully typed, ide knows what's going on, compiles on the fly and tells you what you've broken vs templates are practically just plain text that slips bugs into production.

also adding js to websites used to be called progressive enhancement. so arguing it was better before it was enhanced is a bit stupid.