Skip to main content


I’m at the point where I’m wondering if choosing Svelte for NodeKit is a design error in terms of cultural fit and goals. (They want to be the “serverless” framework for Big Tech. I feel like I’m hitting my head against a wall whenever I want to adapt anything for small web use because it’s all geared towards corporate web use.)

Anyone here played with htmx and hyperscript? Any experience with the community?

https://htmx.org/
https://hyperscript.org

#htmx #hyperscript #thoughts
in reply to Aral Balkan

Question to JavaScript folks who have experience with Node.js… how does the following (theoretical) code listing for a server-side route that renders an index page with a count that’s persisted in memory on the server and updated any time someone loads the page read to you?

#htmx #prototyping #NodeKit #design
in reply to Aral Balkan

Content warning: Re: javascript

in reply to Aral Balkan

Right, thanks to your feedback, this is what the “hello, world” would look like in htmx versus the equiavelent of what I have now in Svelte.

But there’s one big drawback to htmx… no ES modules and thus no components. That’s a biggie.

🤔

#htmx #svelte #javaScript #js #nodeKit #smallWeb #prototyping
in reply to Aral Balkan

… Unless, of course, I implemented it server-side… right, lots to think about and play with :)
in reply to Aral Balkan

Content warning: i have very little experience with jsx, this might be totally wrong

in reply to Aral Balkan

I’ve got experience with hyperscript. It pushes you towards a pure-JS plus CSS structure, but aside from that it works pretty well.

But it’s big tech, too. Pair it with web components and you have a powerful abstraction.

Here’s a lessons learned for web components: https://blog.disy.net/developing-webcomponents/
in reply to Aral Balkan

out of curiosity, what about something native to the platform like Web Components. You could try a small library like μhtml for dom-diffing updates and probably figure out a way to handle SSR with it.

Platform-native technology like Web Components and template strings feel like they align more with your work.

https://github.com/WebReflection/uhtml
in reply to Aral Balkan

You might want to consider Vue.js. Key features:

1. You can make full use of ES modules.
2. Uses regular HTML, CSS and JS syntax in a single file per component, much like Svelte.
3. Fast builds using esbuild and Vite.
4. Can be adopted incrementally.
5. You can even use it without a special build step if you really want to:

https://markus.oberlehner.net/blog/goodbye-webpack-building-vue-applications-without-webpack

Performance wise it's not quite as good as Svelte (because virtual DOM), but not too far off.

https://vitejs.dev/
in reply to mathew 🦜☕

oh great, now @aral will tell us what’s ethically wrong about Vue.js and I’ll have to start liking something else 😅 (jk ofc)
in reply to Aral Balkan

I'm not sure they aim to solve the same thing. HTMX is in the camp of serverside rendering and progressive enhancement, where it aims to put focus back on content in HTML, with lightweight scripting sugar on top. Svelte is a precompiled componentbased SPA JS framework.