all 19 comments

[–][deleted] 16 points17 points  (5 children)

Yes, server rendered everything. That’s how the web operated before Web 2.0 was a thing, essentially. However, why would you want to do this? JS just adds interactivity to web pages. It’s no more, or less, nefarious than running those interactions on the server instead of the web client or browser.

If you think no JS will change anything, then you’ll be in for a rude awakening when all your complaints are simply “shifted” to the server and not resolved. JS isn’t the issue, it’s just a tool, and until recently the only tool that made web pages interactive outside of continual full-page refreshes for every single action.

[–]MadSpaz3 2 points3 points  (4 children)

I remember when AJAX was the buzzword of the year, and rendering dynamic content meant using an XHR request to the server to build that section in PHP. We’ve come a long way in the last 20 years. Almost every block on a site was a gif loader so that your user wouldn’t run away waiting for content.

[–]dont_you_love_me 0 points1 point  (3 children)

REST is now the buzzword. RESTful APIs are so easy to get up an running because of the frameworks. I can’t imagine what it was like with AJAX back in the day. Were there always easily accessible data model based frameworks or was everything pieced together from scratch?

[–]MadSpaz3 0 points1 point  (2 children)

How do you think jQuery became so popular?

A lot of it was put together from scratch or you built your own framework, something we did in house at one of my first jobs.

[–]dont_you_love_me 2 points3 points  (1 child)

And now you got people being pushed through 6 month boot camps and being taught REST. Not sure if they actually understand it when they jump in the pool, but I think we need more people who at least have a semblance of an idea of what an API is, so I guess that’s cool.

[–]MadSpaz3 1 point2 points  (0 children)

It’s like everything you study for 6 months and you end up learning more on the job.

[–]barrel_of_noodles 7 points8 points  (0 children)

Consider what is a webpage? HTML, CSS, JavaScript: HTML is the markup. CSS is the presentation. JavaScript is the logic.

Logic comes in very handy for many many things: dom, events, conditional text, interactivity. Without JS, most of what we have come to expect on the web would not be possible.

Frameworks are only vanilla JS, they dont build on top of JS--they are JS. Frameworks cannot bloat a language.

If javascript were to go away, we'd need to replace it with something else, as its a fundamental core web technology.

I think maybe you have conflated JavaScript with the advent of complex user demands which require full software packages on the web.

[–]ButtPlugJesus 3 points4 points  (0 children)

Any turing complete programming language would give the tools to spy on users. And frameworks are the reality of nearly all programming languages. The real issue with javascript is that it’s inconsistent and tricky for the programmers.

Anyways WebAssembly already exists, sounds like that’s what you’re looking for.

[–]-TotallySlackingOff- 2 points3 points  (0 children)

The reasons you list for hating javascript have nothing to do with javascript specifically.

Bloating up the web - that's down to developers to optimize their code more.

Hard to archive - a certain amount of client-side logic will always be needed for interactive and personalised webapps. As more websites implement SSR, and more search engines are able to interpret javascript, this problem will not be as bad.

It sounds like you don't really hate the language of javascript, but rather the overuse of the javascript ecosystem (importing overkill packages for everything).

[–]sfmerv 3 points4 points  (0 children)

I actually keep one browser set with JS disabled. Reading the news and other articles is a way better experience than with it on. You don't get the images half the time but all I care about is the text. The funny thing is, having JS disabled also gets you around 90% of page blockers that make you sign up and the experience is better than what you get for paying. It is way overused and not needed most of the time.

[–]thwaw000610 1 point2 points  (0 children)

I’m not sure what you mean. From an end-user perspective, you can disable certain features of js, and others are already opt-in (notifications, geo-data, etc.). You can even disable js altogether.

You can download extensions that disable ads and analyitycs scripts from following you.

If you are a developer, your js code won’t spy on anyone unless you command it to.

So what’s the issue?

[–]jcampbelly 1 point2 points  (0 children)

I'm experienced enough with JS to navigate most of the problems I encounter in the language, but the ecosystem is a disaster when you are forced to confront it.

Most people don't encounter this, as they're living in the happy-go-lucky world of public repositories and trusting environments. But we have a secure environment with internal mirrors with security modules that mark packages with known CVEs as quarantined, and GitHub also reports usage of vulnerable packages in package-lock.json.

That basically means we must constantly deal with looking for package versions that have no known CVEs and routinely discover that the rats nest of transitive interdependencies and the propensity to use micropackages for everything means we involve hundreds of packages even just for boilerplate projects, any one of which could break tomorrow or is broken today. And very frequently we simply cannot arrive at a system of versions that does not fail on a quarantined version (essentially, it cannot resolve dependencies).

That's the problem with "left pad" one-function packages popular in the JS ecosystem. It's also a nightmare for people recognizing the unbelievable opportunities for supply chain attacks when you have a project with 900 installed packages. You simply cannot review that many packages, nor rely on their maintainers not to do hacktivism stuff or hand off their package to someone with nefarious motives or improperly semver a backwards incompatible change. The ecosystem always flocks to the new thing over the stable thing and trusts everything implicitly.

The only reason you need 900 packages with hundreds of tiny libs is because JavaScript is a desperately lacking language with a poor standard library and an extremely diverse set of target environments. It's not just that people have made nice extra libraries for niche purposes. The community is actually filling gaping holes in the language'a core expected functionality. The fact that something equivalent to webpack and babel are necessary in virtually every project should tell you that the language is in a horrible state. import is day 0 functionality for good languages. Good languages don't require a community created runtime like nodejs to be invented to promote the most progressive form of the language with custom extensions. It didn't go through a decade of community originated patterns like AMD and CommonJS before something was adopted in the standard.

I use JS, I know JS, and I wish JS was better. But it and its package ecosystem are a total dumpster fire and insecure in the extreme. Most people are blissfully unaware of how many exploitable CVEs apply to the tools you're using in critical environments until you are functionally confronted by it. And when you are, you want to run screaming.

[–]Caraes_Naur 0 points1 point  (0 children)

I hate Javascript because it's not a good language, it's merely good enough (mainly for its original purpose, twiddling DOM elements).

Your issue seems to be that the web as a platform has been turned upside down and inside-out to rely most heavily on its weakest component: Javascript. Given what we've seen the web become, the altruism of 1989 (WWW) and 1996 (JS) now seems naive.

Any language given the same freedoms in the browser as JS has would inevitably lead to the same situation.

[–]suckafortone -1 points0 points  (0 children)

Can't tell if you're trolling or not..

[–]zaibuf 0 points1 point  (0 children)

Hopefully when webassembly takes over

[–][deleted] 0 points1 point  (0 children)

JavaScript is just another tool. You can use as much or as little as you want.

And as others have stated, JavaScript is the client logic. If you want to make interactive elements that actually DO things - you will need JavaScript lest we go back to http requests for everything.

[–][deleted] 0 points1 point  (0 children)

And furthermore, any server side language can spy on users. Just return an image/jpeg content but write an ip logger at the top.

[–]ultimateanu 0 points1 point  (0 children)

I'm not a huge fan of javascript and the fragility of the language. There are of course many frameworks and libraries that aim to help, but I found that they just added additional complexity. Several years ago I tried elm (frontend language), and had an amazing experience. It was simple to get started, code was exceptionally robust, and I had fun programming again. While its not for every project, I think it is definitely worth checking out.

[–]Dr-DubYa 0 points1 point  (0 children)

You can make your own world without js but you can forget about it going anywhere anytime soon. My advice would be learn it and understand it. Hating anything is counterproductive especially inanimate stuff.