Live data from Hacker News

Why Is the Front End Stack So Complicated?

matt-rickard.com

41–50 of 69 posts

Re: Why Is the Front End Stack So Complicated?

#41

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 maintainin…

There is nothing you can do in the front end that a .NET Forms application from a few years ago could not also easily handle.

And the .Net forms application would be immeasurably simpler in terms of complexity and as a bonus, would have the backend thrown in almost for free as well.

I deliberately picked .Net forms because despite being much simpler than today’s front end stacks, it was still, much like any MS product, an overengineered corporate driven MS tech.

Something like Ruby on Rails, Laravel etc shows that front end is not inherently complex.

Re: Why Is the Front End Stack So Complicated?

#42

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 maintainin…

Yep.

Modern clients are complicated because state management is complex.

Ironically, that's what the early web largely got rid of - for example this web page I'm using now has very little state to manage.

Re: Why Is the Front End Stack So Complicated?

#43
Because there was a basic set of primitives that could give rise to almost an infinite number of possibilities. Multiple paths and iterative forces leads this to a very diverse and thriving evolutionary landscape. It has become gloriously messy.

It would be interesting if those studying biological evolution could see how much of their techniques, theories, and predictive abilities could apply in this realm.

Re: Why Is the Front End Stack So Complicated?

#44

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 maintainin…

There is nothing you can do in the front end that a .NET Forms application from a few years ago could not also easily handle. And the .Net forms application would be immeasurably simpler in terms of complexity and as a bonus, would have the backend thrown in almost for free as well. I deliberately picked .Net forms because despite being much simpler than today’s front end stacks, it was still, much like any MS produc…

So why did the frontend engineers move on from Ruby on Rails?

When I was an ROR developer, RailsCasts would tell you to do basically the same thing as HTMX, return partial HTML and use a tiny bit of JS to update the appropriate part of the DOM.

It’s a good fit for simple experiences, but breaks down when you need the result to update more than one place (say, a counter by the cart icon, or a set of options in a select in the sidebar.) Then, you hypermedia approach has forced you to try and explore your HTML snippet to pull relevant information, rather than get it in a nice structured format.

Re: Why Is the Front End Stack So Complicated?

#45
I’d say because it evolved rather than was designed. Layer upon layers of tooling designed to work around the deficiencies of current browsers.

Then browsers improve but now you’ve got all that legacy stuff in there.

Plus of course some silly corporate is still on internet explorer 3.0 or whatever

Re: Why Is the Front End Stack So Complicated?

#46

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 maintainin…

There is nothing you can do in the front end that a .NET Forms application from a few years ago could not also easily handle. And the .Net forms application would be immeasurably simpler in terms of complexity and as a bonus, would have the backend thrown in almost for free as well. I deliberately picked .Net forms because despite being much simpler than today’s front end stacks, it was still, much like any MS produc…

Rendering 3d VR environments with interactive points of interest, live video players with real time highlight markings and sport standings with graphs comparing parallel games in the same league, having online conferences with 20K visitors that can interact with each other through (video) (group) chat.

Sweet.

Re: Why Is the Front End Stack So Complicated?

#47
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…

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…

The app router is definitely not a valid alternative for my current projects on page router. I'm glad I'm old enough not to jump on shiny new things and burn myself in the process. I would actually like to take a step back from Next.js and move to something more simple. Ideally still server side rendered .TSX but with some jQuery like interactivity sprinkled on top on the client.

Re: Why Is the Front End Stack So Complicated?

#48
post #35

Earlier quoted context omitted.

That just explains why do we know about that complexity. Alternatives aren't less complex (and when you need some niche features W3 supports like printers and BT you're in deps hell -- at least you're operating without node.js), but data flows more linearly from server to client.

I find native application SDKs like Cocoa on macOS certainly less complex for the same functionality. E.g. supporting printers there is just no issue. But maybe I misunderstood what you meant.

I was thinking under the cross-platform desktop+mobile league sorry! Obviously when you develop with OS-specific and with a form factor even an SDK so neglected as any linux GUI will be a lot more simpler, and if you face complexity there, it's an issue and not a natural consequence. Furthermore, the classic complex JS front-end excuse is that forbes500 firms, for whom React and Angular have been made, face problems with access and speed in rolling features that probably only MMO games face, which for most of their history have been developed under Windows only.

Re: Why Is the Front End Stack So Complicated?

#49
Because using the web as an "app platform" is a hack. Manipulating HTML with JavaScript to achieve app-like functionality is a hack.

JS, along with other things, was bolted on as an afterthought, because HTML had too much momentum for people to stop and consider a proper way to have sandboxed, portable applications, which is what WASM seems to be, after all this time.

And when there's a quirky platform underneath (HTML + JS), people invent a million opinionated ways to achieve the same thing, because there's no single right way to do it. And each comes with it's own quirks.

Re: Why Is the Front End Stack So Complicated?

#50

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…

Windows native desktop apps are OK in some controlled (or mandated) environments. For example, 20 years ago I was working for a large company that handed only Windows XP laptops to every single employee.

But what if the customer has a mix of Macs, Windows, Linux laptops? Or if before even getting there, they think that they want a web app so they engage only companies that build web apps? A native desktop app will never happen.

By the way, that company I was working on 20 years ago, despite being Windows only had a number of web apps, including timetracking and everything else. I didn't investigate the reasons but I could guess one: distribution of updates.

Post reply on HN