News for hackers. Stuff that matters.
Re:Vanilla Prime: A simpler, more sustainable way of web dev... by smusamashah on Tuesday August 27, 2024 @07:18AM (#41366298)
I am not a web developer and therefore missing the point here. To me these two statements appear in conflict with each other

    > No frameworks, no bundlers, no required dependencies. Just web standards, patterns, a unix-style toolset, and some elbow grease.
vs

    > Install Node.js >= 20.
this is then followed by a "Toolset" section listing a bunch of other tools. I don't understand what is going on here.
Re:Vanilla Prime: A simpler, more sustainable way of web dev... by tejohnso on Tuesday August 27, 2024 @07:49AM (#41366521)
Using development tools is one thing.

Packing your basic web site with 50,000+ SLOC worth of run time dependencies is quite a different story. When you use a framework like react, or vue, or svelte, you're bringing in a massive dependency tree, and you're also changing the semantics of the application code from web standard code to framework specific code. Instead of being an expert on the standards, you have to become an expert in the framework. There are compromises being made either way.

I think that one important thing missing from this project is a templating engine of some kind. Questionable addition though, since you're then going to stop writing HTML and start writing whatever template language. And it's a greased path toward going with a framework.

Re:Vanilla Prime: A simpler, more sustainable way of web dev... by samstave on Tuesday August 27, 2024 @08:22AM (#41366752)
What are your thoughts on "VanillaJSX" which was on ShowHN recently, and is a part of:

https://code.immaculatalibrary.com/

https://news.ycombinator.com/item?id=41269321

Re:Vanilla Prime: A simpler, more sustainable way of web dev... by davidmurdoch on Tuesday August 27, 2024 @09:12AM (#41367167)
Is svelte still bringing in a lot of duplicate code these days?
Re:Vanilla Prime: A simpler, more sustainable way of web dev... by skeeter2020 on Tuesday August 27, 2024 @09:16AM (#41367199)
the rewrite is moving in the wrong direction IMO, maybe for all the right reasons but in short, yes.
Re:Vanilla Prime: A simpler, more sustainable way of web dev... by Etheryte on Tuesday August 27, 2024 @07:24AM (#41366342)
Looking at the package definition, there are no runtime dependencies, the only dependencies are development tools such as linting, testing, etc. I can definitely see how this can be misleading though.
Re:Vanilla Prime: A simpler, more sustainable way of web dev... by ericyd on Tuesday August 27, 2024 @07:36AM (#41366434)
It struck me as weird too. If the author isn't trying to avoid build tools altogether then I'm not clear why they wouldn't just install Vite and simplify their life.
Re:Vanilla Prime: A simpler, more sustainable way of web dev... by austin-cheney on Tuesday August 27, 2024 @07:21AM (#41366322)
They are not in conflict.

Node is a runtime with a large standard library. The Java equivalent is the JVM plus some file system and network handling libraries.

A framework is a rich set of various abstractions designed to integrate in support of a design methodology.

Re:Vanilla Prime: A simpler, more sustainable way of web dev... by skeeter2020 on Tuesday August 27, 2024 @09:15AM (#41367192)
these are all dev-time dependencies. The part that's contradictory is

"A simpler, more sustainable way of web development"

vs.

"Vanilla Prime is not meant to be easy"

I think it's a little naive to believe the JS build scene is somehow divorced from the JS runtime scene, when there's just as much complexity, churn, deep dependency chains and rapid obsolescence.

Re:Vanilla Prime: A simpler, more sustainable way of web dev... by yayitswei on Tuesday August 27, 2024 @09:59AM (#41367603)
Simple != Easy

https://www.infoq.com/presentations/Simple-Made-Easy/

I'm not sure if the author succeeded or not, but at least the goal is clear.

Re:Vanilla Prime: A simpler, more sustainable way of web dev... by morrvs on Tuesday August 27, 2024 @10:01AM (#41367624)
Not sure who said it but I was aiming for the "Simple Ain't Easy" trope here ;)

I agree that the JS build scene can be churning a lot as well (e.g. ESLint's recent config changes), that's why I tried to make everything as orthogonal and disposable as possible.

Re:Vanilla Prime: A simpler, more sustainable way of web dev... by skydhash on Tuesday August 27, 2024 @09:20AM (#41367236)
Prettier, eslint, and the typescript compiler are great. The issue is the npm package gallore that exists currently. No one wants to write code anymore, instead using mini libraries for a function or two, resulting in ~8000 packages for a react application I had to work on.