Live data from Hacker News

Why Is the Front End Stack So Complicated?

matt-rickard.com

21–30 of 69 posts

Re: Why Is the Front End Stack So Complicated?

#21
>> Why Is the Front End Stack So Complicated?

Because it's always morphing. Once upon a time, it was only desktop. Then it became mobile. Then the browser added "features" and websites want that "feature". Video. Animation. Accessibility. Wasm. Then where do we hosts websites? I used to be a desktop in a closet, then it became dedicated, containerized, serverless, server-side, client-side, monolith, micro-arch. Information morphs, too. Tracking, telemetry, A/B testing, search, session state, data storage, AI.

Where do we go next?

Re: Why Is the Front End Stack So Complicated?

#22
I have a customer that uses Vue. It's much easier than React but still not easy enough. The complication as usual is the state management. There are prop local to a component and a global state. Computed values and "real" values. There are different ways to update those values some as easy as to assign to this.property and some complicated calls to functions somewhere else. Again, compared to React there is less time lost in boilerplate and puzzles, but it's still too much given that often all I want to do is equivalent to

  this.parent.aList.push(item) 
or

  globalState.customersList.push(item)
Ideally I'd write it in JavaScript instead of using an API. I would accept

  globalState(customerList, "push", item)
if calling a function of the library is the only way to trigger the UI update code.

Edit. I add an extra nuisance that could be solved by a better and more straightforward syntax

I have to work with code like this

  store.js:
  import * as model from './modules/model'

  component.vue:
  import { mapState } from 'vuex'
  computed: {
    ...mapState('model', ['model']),
  }
  this.$store.dispatch('model/method', {...})
which calls "method" defined in "model" and which is very convoluted compared to what we are used to in other languages

  import Model from `store/model`
  Model.update(args)
If often think that framework and library authors don't try hard enough to build tools with simple interfaces. That reminds me about Erlang/Elixir handle_call/handle_cast.

Re: Why Is the Front End Stack So Complicated?

#23

The stack is not te problem, the problem is people using the incorrect tools and doing over-engineering. React and others are simply a tool to pass the logic to the client. Useful in situations like apps that can run almost completely without the server or it can manage the offline situations. All the related tools are only optional things to improve something: • transpilation for older browsers • talwindcss to manag…

> The stack is not the problem, the problem is people using the incorrect tools and doing over-engineering.

Chicken, meet egg

Re: Why Is the Front End Stack So Complicated?

#24
One of the reasons is that users' expectations of UX rised with 1-2 orders of magnitude in the last 2 decades.

Whereas the platform (the web) and the languages (HTML, JS and CSS) do not offer a cohesive answer to those expectations. It's all just bits and pieces of improvement here and there.

Often the frameworks that aim to solve this use abstractions over these languages and APIs (e.g the DOM, routing). And these abstractions (ts, jsx, react, css-in-js, tailwind ...) are not a cohesive unit and bring back the same/more friction that's inherent to the web - 3 languages trying to play with each other) - ...

... But this time with even more "parts" and abstractions.

Web technologies weren't designed to build web apps. And since a re-design/rewrite is off the shelf, we're content with small improvements that add improvements but also increase friction.

We do need to rethink this.

Re: Why Is the Front End Stack So Complicated?

#25

Earlier quoted context omitted.

It's still ridiculously complicated in so many other ways, ignoring backwards compat completely. I wish I could describe my most recent attempt at migrating our app to the new Next 13 app router for an audience, on camera, on stage. The levels of confusion and dead ends, and configuration, and error screens, and the need for truly expert-level knowledge just to get things working as one would expect made me realize t…

As an interesting contrast, I work on a WPF app professionally that has been around for sure since .NET 3.5 (with references to .NET 2.0 DLL's at times) - at least 12 years - and as much as we give MS crap for abandoning WPF, I can still crank the project open in the latest Visual Studio, probably transparently upgrade to .NET 6 - and everything just works. There are a lot of advantages to web-based frontends but som…

Too bad Microsoft refuse to work on proper cross platform WPF support. I've tried Avalonia UI[0], but it's just not the same. For instance the lack of a proper out-of-the-box virtualized list.

[0] https://avaloniaui.net/

Re: Why Is the Front End Stack So Complicated?

#26
It is rather simple why: Frontend is not linear programming, most backend actions are single-flow (on A do B), in frontend at any point the user can interrupt things, which calls for state management.

Most backend applications are stateless and state management is outsourced to a database which does the heavy lifting. So the complexities are in scaling. Maintaining a complex frontend application is akin to maintaining a complex caching layer in front of your database.

The tooling hell doesn't help of course, but I wouldn't say it is the main reason.

Re: Why Is the Front End Stack So Complicated?

#27

>> Why Is the Front End Stack So Complicated? Because it's always morphing. Once upon a time, it was only desktop. Then it became mobile. Then the browser added "features" and websites want that "feature". Video. Animation. Accessibility. Wasm. Then where do we hosts websites? I used to be a desktop in a closet, then it became dedicated, containerized, serverless, server-side, client-side, monolith, micro-arch. Infor…

The beauty of programming general computers is the endless flexibility. It's also the biggest danger. Holding it together against entropy and adversarial compute actually runs against how people like to code: experimentally and moving on as soon as the new desired feature is online. So project management and security are both bolted on and increase complexity greatly. Specialists are also incentivized to do a lot of arcane stuff, because if it looks good and sounds complicated it bolsters the value of their skills.

Computers and computer networks were designed in high trust environment to facilitate free communication. It was pioneered by academics and military organizations, where only highly credentialed people ever touched anything. When the web went commercial in 1993 I think we started a cambrian explosion of diversity in computation. I guess it wouldn't have gone as far without two decades of zero interest money and VC backed 'growth hacking'.

Re: Why Is the Front End Stack So Complicated?

#29

Computer-to-human interaction is vastly more complicated than computer-to-computer interaction. System complexity can be bounded by well-defined rules. UI needs to account for different screen sizes, input methods, human error, changing trends, even psychology.

And yet modern UIs fail miserably at basic accessibility. Often, they even manage to fall below the baseline of static HTML.

Re: Why Is the Front End Stack So Complicated?

#30
The real sad reality is that the web is just too archaic, it was never design with "apps" or even multimedia in mind.

We tried to move past this by going peddle to the metal with Javascript, and now we are slowly realizing that, while we can do this, there are major scaling issues.

And so now the hot new thing is things like svelte.

Rinse and repeat. And honestly at this point I'm more and more leaning towards dart + flutter might be the future or maybe something else with strict unified standards and is design with apps and multimedia in mind (like what flash was partially).

Post reply on HN