by rckrd on 10/16/23, 1:53 AM with 68 comments
by qwertyuiop12 on 10/16/23, 4:31 AM
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 manage the styles -if you are a lot of people- • redux or others to manage the application state
For other kind of applications, you can continue using the same pattern where the server has the main responsibility of generating the entire view.
In my case, I’m quite happy using htmx and avoiding frontend frameworks because usually I don’t develop offline apps.
by clement_b on 10/16/23, 5:45 AM
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 :)
by syntheweave on 10/16/23, 3:31 AM
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", imagining the TV-ification of the Web.
by DanielHB on 10/16/23, 6:56 AM
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.
by steve1977 on 10/16/23, 3:18 AM
by adamredwoods on 10/16/23, 6:29 AM
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?
by adfm on 10/16/23, 4:56 AM
https://htmx.org/essays/how-did-rest-come-to-mean-the-opposi...
by snarkypig on 10/16/23, 6:59 AM
by j45 on 10/16/23, 5:16 AM
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.
by 0dayz on 10/16/23, 7:07 AM
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).
by ChrisRR on 10/16/23, 2:56 PM
Whatever happened to the interest in static site generators a few years back? It seemed like we were finally going to move away from heavy javascript just to show some text and images, and yet the javascript seems to be getting ever heavier.
by abdellah123 on 10/16/23, 6:51 AM
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.
by qweqwe14 on 10/16/23, 2:23 PM
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.
by phil_kahrl on 10/16/23, 6:23 PM
"No universal import system" - Rust has it's own module system and Cargo is used for managing dependencies, no need to worry about different module systems.
"Layers of minification, uglification, and transpilation." Just compile Rust to WASM file for the browser, same as using any other compile target.
"Wildly different environments." Something that you'll still need to deal with. Some runtime dependencies are system-specific (code running on the browser usually needs access to Web APIs, and JavaScript, code running on the server can't access WebAPIs but can access the system clock and filesystem. Sometimes separate libraries or separate runtime configs are needed (e.g. configurable time source)
"Overemphasis on file structure." Not a problem for imports, but you may still have file structure dependencies things like CSS, image resources etc.
"Configuration hell." Pretty much non-existent once you have your Rust compiler setup locally.
"Development parity." Just use trunk: https://trunkrs.dev/, to watch, build and serve, config is minimal.
by addicted on 10/16/23, 10:18 AM
I don’t know which, if any, nodejs alternative will succeed it, but if say Deno were to do so, the stack would be immeasurably simpler.
Right now, hopping between 2 different JS projects both of which do the exact same thing, means you may have to learn completely different build processes, completely different minting rules, completely different typescript compilers, completely different module import syntaxes/formats/configurations, completely different test runners, test description languages, etc. completely different standard libs (one may have lodash while the other is importing individual functions from npm), etc.
Heck, even your nodejs may not be nodejs but rather could be yarn, pnpm, etc
I believe nodeJS’s decision to essentially outsource all basic functionality while the JS ecosystem figured itself out was a huge reason for its success, but now that many things are more established, it’s causing a lot of unnecessary complexity.
by pmontra on 10/16/23, 6:35 AM
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.by superasn on 10/16/23, 2:54 AM
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 make sure your frontend can run everywhere including mobile devices, hence the complexity.
The amazing part is ever since vite has been on the scene a lot of it has been abstracted away. There is no need to even compile anything during dev which has been a game changer.
by holografix on 10/16/23, 6:13 AM
Not only are they apps, they’re networked apps with the necessary remote process calls (APIs) and all the added complexity that entails.
by tpetrina on 10/16/23, 7:14 AM
That said, one of the major problems is that there is no clear explanation for these boundaries in the tooling and code. Yes, you can `npm install lib` and unless it is documented in readme, it won't be obvious will this run in node only or in web too.
by dep_b on 10/16/23, 7:20 AM
by youngtaff on 10/16/23, 7:36 AM
And as developers we tend to like the next thing and complexity
by Havoc on 10/16/23, 11:48 AM
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
by jostylr on 10/16/23, 10:37 AM
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.
by xet7 on 10/16/23, 4:15 PM
What I did, is I removed all linters, like eslint, prettier etc, because they did disagree about syntax. Point is to make to code minimal change, that fixes something, or adds some feature. Not that most commits would be about fixing syntax.
I also merged all branches to one main branch, because merging between branches did take a lot of time.
What if there would be no build step? DHH has some nice ideas about that:
https://world.hey.com/dhh/you-can-t-get-faster-than-no-build...
Let's make progress towards less complicated stacks.
by qwemaze on 10/16/23, 9:13 AM
by exabrial on 10/16/23, 5:31 AM