Live data from Hacker News

Ask HN: Why did Frontend development explode in complexity?

news.ycombinator.com

391–398 of 398 posts

Re: Ask HN: Why did Frontend development explode in complexity?

#391

Earlier quoted context omitted.

> visual and non-visual parts are separated globally, not on a view-by-view basis Yes, yes, and YES! This is something that confused me greatly over the last years: teams/companies I was in contact with were really struggling getting MVC to work (never mind MV*) and I wasn't...but I wasn't doing anything special, at least not that I could tell. I would implement my model, TDD-style, put minimal views on top, possible…

Does this mean we could fragment an application into, say, a low-level "engine" or "kernel" in C or Rust, an application server to handle requests to it, and the view be any of a React Native mobile app, desktop app, or convenience web API? Please forgive the lack of background of this next question, but does this mean you do not support BFF pattern? Have you heard of Dubray's SAM (State-Actor-Model) approach? Curiou…

> a low-level "engine" or "kernel" [..] and the view be any of a React Native mobile app, desktop app, or convenience web API

Yes, exactly that. Not my idea, of course. See for example Hexagonal Architecture. Or good old NeXT Enterprise Objects Framework, later extended by WebObjects.

> Have you heard of Dubray's SAM

No I hadn't, thanks for the tip!

He identifies one of the core problems with how MVC is incorrectly applied:

"The core issue here is [that in] traditional MVC, the action (controller) would call an update method on the model and upon success (or error) decide how to update the view. "

https://www.infoq.com/articles/no-more-mvc-frameworks/

However, he incorrectly claims that this is "traditional MVC". It is not. In fact, traditional MVC clearly forbids this, as it states that the View updates itself from the model. The View is active, you don't push data to the view.

Model -> View communication is a notification. That's it. (This is also how it is implemented in Smalltalk MVC, which is the prototypical and archetypical MVC implementation).

Re: Ask HN: Why did Frontend development explode in complexity?

#392

Earlier quoted context omitted.

Because you can't do that with vanilla HTML/JS/CS.

Of course you can, but it would be hell when it comes to state management.

In that world we used to handle all the state on the server side.

Re: Ask HN: Why did Frontend development explode in complexity?

#393
post #379
post #258

Earlier quoted context omitted.

For me the reason for the explosion in complexity in both frontend and backend comes down to package managers on all platforms getting way better with transitive dependencies and lowering the cost of adding those dependencies. Developers used to be wary of bringing in another dependency just in case it created some conflict, but ecosystems that near-perfectly encapsulate transitive dependencies have gradually done aw…

Ironically, I think more dependencies are actually better, because it means they are smaller. "Do one thing well". The problem is large dependencies depending on other large dependencies. Dependencies should advertise their transitive dependency tree size including LOC per dep. Also, the fact that every dep has it's own non-standard build process, language, dir structure, and ESM/CJS legacy support, makes things not…

> Ironically, I think more dependencies are actually better, because it means they are smaller. "Do one thing well".

I could believe this if I thought that having 1500 dependencies led to less code overall, but the size of my node_modules folder shows that assumption to be flawed.

The other problem with this argument is that each dependency you add is another set of developers that you are depending on. It's another group of people who could suddenly pull a left pad or worse, and it's another group of people who you have to trust to have written secure code. The fewer dependencies I have, the smaller my chances of being exploited because of a people problem.

Re: Ask HN: Why did Frontend development explode in complexity?

#394
post #97

At first, only devils used JavaScript. Then jQuery/AJAX/Web2.0 made it permissible for it to be used for good. Then Apple killed Flash. Clients and employers still demanded fancy web sites that weren't just hypertext and images. Browsers still only supported JavaScript. Node and npm enabled front-end devs to build and share. All the tiny problems that front-end devs used to deal with, like minor browser incompatibili…

May I take advantage of your (presumed) typo, to henceforth refer to myself as a JavaScript Devil? That's good enough for a business card/avatar tag/equivalent, IMO--yeah, I love it!

Not a typo. In the ‘90s JavaScript was only for devils who tried to make annoying pop-up ads and such.

Re: Ask HN: Why did Frontend development explode in complexity?

#395
"If all you have is a hammer, everything looks like a nail."

Frontend frameworks like React are used everywhere. For real web applications like Facebook, they totally make sense. But for a lot of other projects, they don't because those projects do not have a complex UI/UX and so the framework adds more complexity than needed.

Re: Ask HN: Why did Frontend development explode in complexity?

#396
* The increase in complexity is unavoidable as well as accidental (creep due to marketing). Some of it is necessary to address the increased sophistication of the web. Just compare what we can do today to what we used to do in 1996 with cgi and perl.

* It is not that native GUI libraries like Qt or SDL or GTK are super easy. GUI are event driven and composed and need to be in sync with the user wishes and as such have a programming model that is different from a top to down execution of instructions.

* The biggest challenge with the current state of front end development though is that there are no standards and no stability on a YoY basis. What I learned to do with PHP in 2005 is still valid. I can still use those tricks and whip something useful. What I learned to do with tables in mysql 3.x is still useful with mysql 8.x. However the world of Javascript frameworks is one of shifting sand.

What I learned with Javascript framework X.1 will be obsoleted by X.2 and will be obsoleted by X.3. No guarantees for time investment is challenge #1. angular 1.x -> 2.x, Vue 2.x -> 3.x are some examples that come to mind. Think of all the wasted effort. That is the killer. Humans are good at making peace with whatever crap is thrown at them. I do not think technology is the reason here. It has more to do with hype cycles and trying to catch developer's attention in a competitive market with new buzzwords.

* There is a lack of simple tools like what visual basic used to do. Sure, everything is async and we are in an event driven world but frameworks could have provided a common core to enable simple use cases. bootstrap library is a case in point. I can get decent results with bootstrap without knowing the intricacies of css. However I am hard pressed to find a suitable Javascript framework.

Re: Ask HN: Why did Frontend development explode in complexity?

#397

Early react team member here. The popular react/webpack/npm stack is probably what the OP is talking about. It was popularized because the Instagram web team used webpack and npm in 2013 so we recommended it alongside react in the early days. I was TLM of the team when we made these decisions. There are three main points I want to add to the conversation. 1. UIs actually have a lot of complexity. The number of states…

By "ZIRP", did you mean "Zero interest-rate policy", "Zurich Integrative Rodent Physiology" or "Zimbabwe Idai Recovery Project" (top 3 results on DuckDuckGo)?

Re: Ask HN: Why did Frontend development explode in complexity?

#398

Earlier quoted context omitted.

Does this mean we could fragment an application into, say, a low-level "engine" or "kernel" in C or Rust, an application server to handle requests to it, and the view be any of a React Native mobile app, desktop app, or convenience web API? Please forgive the lack of background of this next question, but does this mean you do not support BFF pattern? Have you heard of Dubray's SAM (State-Actor-Model) approach? Curiou…

> a low-level "engine" or "kernel" [..] and the view be any of a React Native mobile app, desktop app, or convenience web API Yes, exactly that. Not my idea, of course. See for example Hexagonal Architecture. Or good old NeXT Enterprise Objects Framework, later extended by WebObjects. > Have you heard of Dubray's SAM No I hadn't, thanks for the tip! He identifies one of the core problems with how MVC is incorrectly a…

Thank-you for your reply. I had another question about models and the database.

It feels to me that the database tends to be more stable over time than the application: frameworks, design approach, and architectures come and go, but tables, stored procs, and views have always been there.

That said, supposing we were to start with the data model and many business rules expressed in the database first, would you reach for GraphQL to help the app manage the data it needs, or acquiesce custom db objects to provide the required data?

With SAM, I thought there would be a way to avoid BFF, while conforming to a TLA+-ish way of enforcing (the model's valid) states at all times.

I know I am handwaving a lot of ideas. Just wanted to get your input on the backend side of things.

Thank-you.

Post reply on HN