Dead Comment
I think this is the important thing here. Everything feels less stable, and more prone to breaking, on the modern web. You write some simple HTML, style it with CSS, and write vanilla JS for the parts that need it, and everything feels solid. You start a new project with a framework, and it seems like there is this whole area of your project that is essentially a black box, ready to break (or misbehave) any time.
Now 1 component will be: server side html, client side html, css and js.
I find that even with well behaved libraries and tree shaking, my output css still includes a lot of stuff I don't need. (Eg. Yes I use Foo.Button but I don't need all the css for the styles of Foo.Button I never use like circular or large or withIcon)
But to me, the code is longer, more unwieldly, more prone to error, and to top it off, it also inherits all of React's annoying idiosyncrasies. It's weird to even type this out, but Java's Swing felt more intuitive than seeing D3 on top of React.
For example:
<circle
cx="150"
cy="77"
r="40"
/>
Just the fact that this could technically be written as draw.circle(150, 77, 40) in any sane programming language should give you some pause.React just uses js, almost plain.
That is, JS can be used to do everything but it is not optimal, or even near optimal (or even remotely close to) for many use cases. In terms of runtime or simplicity. But because it is capable and available, it has encroached into every niche (of html/css) until like any invasive species, it consumes and shreds through all available resources, collapses the whole ecosystem, and all complex creatures give way to a fresh start with new fairly rudimentary biology (wasm) trying to evolve towards and find a new stability point — hopefully one that does not invite a similar destructive species, but we’ll see how it goes
Even a basic thing, could be impossible in css.
All your css logic goes to trash. Or you can keep css logic and make a mess of a software
If you have done it in js, you'd be able to reuse some code.
It's open source so feel free to adapt as needed.
https://benkaiser.github.io/learn-piano/
I've found it works well for my wife and I playing simple songs together, she never learned sheet music (and I'm not great at it) so this format is very easy to follow.
You can play online at the same time with multiple people
At the very least, this kind of article is informative for that crowd.
Then you'll end up having a project with highlighting logic in css and js. That's less than optimal
Give up, do some super hacky unmaintainable css mess, or suck it up and use js...
- Lack of a good standard API; compared to environments like Java, C# or Go, node's standard library is significantly sparse.
- The tendency for small libraries/frameworks leads to a very high number of third party code with all the problems attached; bigger attack surface, licensing challenges, it's economically impossible to vet and review dependencies
- There's a tendency in the ecosystem to abandon projects rather soon (~1-2 years) and to keep changing things. Further, we have had several situations where maintainers did not respect semver, combined with npm's approach of updating patch versions upon installation, we have had too many broken builds from one day to another w/out code changes. The state of documentation of a lot of projects is non-existent.
- Lack of multi threading. We have used all the options, including RPC implementations, but that doesn't even come close to approaches like Java threads or go routines. Neither in performance, nor in maintainability.
- Lack of typing. That's probably the biggest one. Yes, we use TypeScript, quite extensively even. But TypeScript brings its own problems. First, it's only declarative. If you have a `something: number`, there's no guarantee that it's actually a number upon execution, so if you have a bug in a layer interacting with another system, that might fail a couple levels deep. You hence end up with type checks at some places and you cannot really trust it anyway. Second, TypeScript's tooling is slow and has some annoying quirks (e.g. aliases not being resolved upon compilation). Having aliases allowing to shorten import paths is a big, big win, though. Third, the typing, given the complexity of JavaScript, can be confusing, sometimes even seemingly impossible to get right.
Is node a bad technology? Not at all. I'd not chose it for enterprise, big or long-lived projects, though. It's a very good technology for a lot of things, especially smaller projects. We are building on Java + Spring Boot now.