Live data from Hacker News

Breaking up with JavaScript front ends

triskweline.de

381–390 of 433 posts

Re: Breaking up with JavaScript front ends

#381

I haven't scroll the whole way through, and am a complete novice to webdev but this is reminding me of htmx a little. Is it just me?

Unpoly predates htmx by a couple years.

htmx is intercooler.js 2.0

intercooler.js started in Dec 2013:

https://github.com/bigskysoftware/intercooler-js/commit/62d3...

unploy started in Dec 2014:

https://github.com/unpoly/unpoly/commit/6d1691815b9c89f10e9b...

Re: Breaking up with JavaScript front ends

#382

Earlier quoted context omitted.

"I haven't died playing russian roulette, you should try it too." The general experience across the industry in a statistical sense is that JavaScript frameworks are a tyre fire best avoided. I'm yet to see a JS app that doesn't need constant maintenance to remain compilable. Meanwhile, the ASP.NET ecosystem had like one significant breaking change since like... 2002.

JavaScript itself is entirely backwards compatible back to 2002. If anything, I'd argue raw .NET is far worse than raw JS for backwards compatibility, because .NET has depreciated entire languages like VB6. To compare something like React to .NET, let's look at .NET libraries and frameworks. For example: Sliverlight, WebForms, WPF, WCF SOAP, old versions of EF, or old versions of MVC. It's not been pretty for .NET, a…

WebForms, WPF and EF 6 have been ported to .NET Core.

WCF althought not initially supported, the industry has made enough pressure, that most of it is now available on WCF Core.

SOAP libraries still exist.

Thanks to the magic of WebAssembly, you can port that 2002 Silverlight application to OpenSilver, and use it on any modern browser.

Re: Breaking up with JavaScript front ends

#383
post #100

Earlier quoted context omitted.

Alternatively, web developers could calm down and just write mostly HTML with some plain javascript where warranted. I've recently done some web development for the first time in 12 years, and I was horrified at all these pointless frameworks that break every usability win web browsers have made in the past 20 years, cost extra bandwidth and have atrocious performance. Like, why? Can web devs really not learn the 4 f…

So you haven't done web development in 12 years, but you're qualified enough to call these frameworks pointless? I haven't written Java in years so I can tell you with authority that Java 17 is terrible and we should just go back to the good old days of J2EE.

I feel qualified, because I’ve been a SWE for 20 years, have worked in lots of domains (including web, sometime ago) and so I feel I am able to draw comparisons.

Not for nothing, but when I wrote a couple of web apps recently (most recently a market monitoring tool and a physics simulation in wasm and webgl for rendering), I tried different frameworks, but always ended up dropping them. The end result is snappy and fits in kilobytes, and the freaking back button works.

I did of course use some libraries for rendering things like graphviz. I am not a crazy person. But I fail to see what value e.g. react.js* adds, or why there are libraries to wrap websockets.

* For react specifically, I can actually imagine scenarios where it’s useful, but in practice, 95% of places where it’s used should have probably just been HTML with some minor JavaScript for bits of interactivity.

Re: Breaking up with JavaScript front ends

#384
post #363
post #303

Earlier quoted context omitted.

Next.js is really easy for developers of all levels to work with though. It’s main benefit is the ease of use, not the optimized client side data transfer. What I see from Astro.js is a lot of magic. This is great if it works, but chances are it won’t for a lot of people.

Did you try Qt and QML for creating a GUI? It's soo much easier on the brain its not even funny.

A long time ago. It was so painful I resolved to never do the same thing again.

Presumably things have changed in the meantime, but I just don’t see the point any more. Web has won and my experience is there already anyway.

Re: Breaking up with JavaScript front ends

#385

Earlier quoted context omitted.

As the old saying goes: "We have a new framework that will make the existing ones obsolete." This makes n+1, not 1. An agency usually deals with different customers, different settings. What I achieved by migrating dozens of apps to a Angular only frontend, is a platform. Reusable components, devs that can easily switch projects. This is the one and only framework we use, monoculture. This is a beast, we could abstra…

I could see Angular working out great for certain type of projects and teams. I used it for one project for front end and didn’t dislike it at all. Unfortunately I see Angular relegated in favor of React mostly..

Angular is still the go to framework in Java and .NET shops when a SPA is part of the project.

It is kind of changing in Sitecore projects, because they have a collaboration deal with Vercel, and are pushing Next.JS/React as the main framework for headless CMS workloads.

Re: Breaking up with JavaScript front ends

#386
post #347

Earlier quoted context omitted.

Nobody cares that you can build up a DOM differently, that's decades old. What matters is: how do changes behave? Your example shows nothing of the complications of lifecycles or state-render loops.

Respectfully, that isn’t decades old. The example above is brief due to forum limitations, so yes, it doesn’t include lifecycles or the whole implementation of a rendering loop. But the context of that comment was using one or more languages for building interactive hierarchies of widgets, and not the topic you brought up, so it didn’t even have to.

Yes and no. That you can build a hierarchy with Element(attrs, children) where attrs may include callbacks is really decades old. Plain JS does it, react and angular do, and also a million template languages.

The question is, how can we not end up in a spaghetti ball? Your scripting style alone brings nothing to the table.

I would look up to something like Elm, which does answer OP's question.

Re: Breaking up with JavaScript front ends

#387
post #77
post #45

Why can't anybody talk about the fact that HTML was not designed for being dynamic? Isn't there any format that is a real alternative to HTML, which is truly interactive, lighter than the DOM, use text as a mediu, is multi usage and platform agnostic, can use whatever scripting language, and be easily rendered? It's not another new format, it's just that a new format is needed to make things simpler. I have zero pati…

Whenever I build something on the web, I can't help but feel like I'm dealing with a word processor. A very advanced one, but nevertheless still a word processor at its heart. Coming from native apps, I despise the idea of text just being out there without a TextView or something. I also miss Flash.

Same here, that is why when coding Web apps, I gladly take the back seat, and although I tend to rant about WebAssembly, I am grateful for it bringing Flash like development back.

Re: Breaking up with JavaScript front ends

#388
I find the complexity graphs to be a little misleading. If the client side complexity grows, but server side complexity doesn't decrease at all, then something has gone wrong.

If you have a fully client-rendered SPA (not saying an SPA is the only thing you should ever build, but many of the complaints seem to be aimed SPAs), then why do you still need Models, Controllers, and Views on the server? Or Routing for that matter. Many modernish SPAs would handle all the routing client side. So your backend complexity might look more like: Asset Packing, API, Authorization, Dependencies

So you've moved some of the complexity from the server to the client. You may or may not like that, and there may still be a net increase in overall complexity, but it's not the same as necessarily suddenly 2x complexity.

Also I don't know what Authorization is doing in both graphs. Or why Virtual DOM is there - yes you might be using a Virtual DOM, but it's presumably part of one of your dependencies, and not something you're interacting with directly or maintaining. Also what is a "Controller" in React? React (and similar frameworks) don't fit neatly into the MVC paradigm. I guess it's more like Components + Models? Although the Components aren't always cleanly separated from Models/business logic, which can be a strength and a weakness.

Re: Breaking up with JavaScript front ends

#389
post #306

Earlier quoted context omitted.

What browser are you using? Having Gmail open doesn't even use half of a percent of a single core on my machine (Linux, x86, Chromium).

Chrome on an M1 Pro Mac. This is the number that Chrome’s task manager shows me. I do have a lot of emails, but I think it should only have to worry about 100 of them at a time, so I don’t know why it’s different for me and you. It is possible that my account still receives beta features, because I used to work there, but I remember it being like this for multiple years, since the new gmail came out.

Are you using Chrome through Rosetta? I'm still unable to replicate this on either my desktop or laptop, both of them just idle when I open Gmail and neither will push past 5% usage while I'm opening emails. Your metrics seem a bit odd here.

Re: Breaking up with JavaScript front ends

#390

Earlier quoted context omitted.

I’m actually happy about how garbage reddit is. I considered installing a redirect plugin to send me to the old.reddit subdomain[1], but ultimately decided I shouldn’t encourage myself to use Reddit, having it load into that dumpster fire of a front end has really helped discourage me from using or interacting with it. I can happily report my reddit usage is at an all time low! [1] fun fact, you can shorten this to “…

> I considered installing a redirect plugin to send me to the old.reddit subdomain I use RES[1] to force the old layout (along with many other things). 1: https://redditenhancementsuite.com/

Where is that setting in res? I was looking but could not find it.
Post reply on HN