Live data from Hacker News

Why Is the Front End Stack So Complicated?

matt-rickard.com

11–20 of 69 posts

Re: Why Is the Front End Stack So Complicated?

#11

The front end is where the greatest leverage to control user behavior is. Therefore, demand to add features there is also the strongest. Recall that what got investors excited about the Web in the 90's was inline images. They didn't respond to hypertext, but they were looking for a next thing after "multimedia" and saw opportunities. Next thing you know, they were writing thought-leader articles about "push content",…

The complexity in front-end code does not follow from that. User-oriented features are orthogonal to the issues described in the article (those are all developer-oriented), and all the described issues are not new in any way, and handled well in other environments:

no universal import system: Practically all other languages have a universal import system.

minification, uglification, and transpilation: Many other languages are not just minified, but actually compiled to machine code or at least VM bytecode, and still handle source mapping, debugging and code references in stack traces better.

different environments: This point is the only one that partially applies, because the front-end is fixed to JS due to browsers. Non-browser front-ends exist though, e.g. native apps, and have no problems sharing code through libraries.

file structure: littering the root folder with config files is annoying but hardly a real issue.

Configuration hell: Works fine in other languages (no all of them, though)

Development parity: Works fine in other languages (no all of them, though)

Re: Why Is the Front End Stack So Complicated?

#12
Part of it is flash going away too soon before there was a viable replacement for rich us experiences and it’s taking some time to make that happen (and then some).

Things have been quite brittle and requiring constant updating, or more than seems reasonable. Many devs don’t know a better or simpler time.

There seems to be some emerging options, whether it’s the livewire type technologies, or the most recent new curves that libraries like svelte, flutter, alpinejs and more have taken, providing most of the bang with less overhead.

Re: Why Is the Front End Stack So Complicated?

#13
post #10

I guess it starts by abusing a document system to develop interactive applications instead of using an actual application SDK.

Or - on the backend there has been constant evolution of frameworks but browsers didn't provide lot of features that IMHO should have been in place such as ways to split and import into each other JS and CSS files or having variables in CSS and such.

But that goes probably back to what I mean. Browsers didn’t provide that because it wasn’t their purpose.

Re: Why Is the Front End Stack So Complicated?

#14
post #2

Well most of it is for backward compatibility I guess so your newest frontend can still run in a browser as old as internet explorer by changing a few Babel settings. Some of it is to optimize the code delivery so you're sending just the bare minimum source code and not wasting user's bandwidth. Of course if you had just one newest browser then you could do away with most of it but at the end of the day you have to m…

Vite fte. It has drastically simplified my development experience and it's crazy fast! I don't know why Next.js is considered the default for React development The dx is poor and idk if I'm missing something but I've found navigating through a Next.js app to be super slow, I mean seconds between page loads. I get that it has its use cases, ie. rendering static content like blogs and marketing pages but I've seen so many developers that use it for user-based data applications and that's just wrong imo.

Re: Why Is the Front End Stack So Complicated?

#15
post #9

It could have something to do with REST not meaning what you think it means. https://htmx.org/essays/how-did-rest-come-to-mean-the-opposi...

This article is kind of odd in that it implies that HTML inherently satisfies the uniform interface constraint, and somehow JSON can't. JSON can provide a linked representation of the state of the application just like HTML can.

Re: Why Is the Front End Stack So Complicated?

#17
post #10

Earlier quoted context omitted.

Or - on the backend there has been constant evolution of frameworks but browsers didn't provide lot of features that IMHO should have been in place such as ways to split and import into each other JS and CSS files or having variables in CSS and such.

But that goes probably back to what I mean. Browsers didn’t provide that because it wasn’t their purpose.

Yes they didn't provide because at the core, they wanted to stay a document viewer.

Re: Why Is the Front End Stack So Complicated?

#18
I see a couple of things.

1) Some front end needs and/or frameworks were developped by companies having a scale and pool of talent justifying the needs for new tools tailored to their use cases (extreme audience = need to address many user specificities + pool of talents means the best brains on this planet invent something: doesn't help in coming up with a trivial solution). React, Flutter, AMP.

2) During the zirp, coming up with some great tech was also a way to attract talents. Using such tech was (is) a way to be part of that group too. There is a trend effect. I am wondering whether complex front end tech stacks are justified when you can't hire the best talents and when you need to work faster to keep in business.

3) Micro service all the things leads to using API's everywhere which leads to have consumers everywhere including your front end. Coming back from this could mean using simpler apps and dropping some of the front end complexity.

Probably more :)

Re: Why Is the Front End Stack So Complicated?

#19
post #9

It could have something to do with REST not meaning what you think it means. https://htmx.org/essays/how-did-rest-come-to-mean-the-opposi...

This article is kind of odd in that it implies that HTML inherently satisfies the uniform interface constraint, and somehow JSON can't. JSON can provide a linked representation of the state of the application just like HTML can.

It does mention this in the section "“REST” Wins, Kinda…"

""" Some pushed through to Level 3 by incorporating hypermedia controls in their responses, but nearly all these APIs still needed to publish documentation, indicating that the “Glory of REST” was not being achieved.

JSON taking over as the response format should have been a strong hint as well: JSON is obviously not a hypertext. You can impose hypermedia controls on top of it, but it isn’t natural. """

Personally, the section "The Crux of REST: The Uniform Interface & HATEOAS" says it all.

Post reply on HN