Live data from Hacker News

Ask HN: Experiences w “JS-free” front ends? (Hotwire, Unpoly, Inertia.js, htmlx)

news.ycombinator.com

31–40 of 41 posts

Re: Ask HN: Experiences w “JS-free” front ends? (Hotwire, Unpoly, Inertia.js, htmlx)

#31

Just talked on a slack about this. I strongly dislike htmx since it creates a DSL where there wasn't one needed. I think in general if you don't need to build custom behavior (which a SPA enables) then going pure SSR (without any of these) is a good way. If you need custom behavior then these solutions probably won't be enough. To me it feels like a very small slice that needs these solutions but still don't need a "…

This is hyperscript you are unhappy with, not htmx. You can (and probably should) use javascript for this sort of thing.

htmx is a straight forward extension to HTML as a hypermedia, facilitating more functionality within the original hypermedia model of the web. A good pure htmx example would be active search:

https://htmx.org/examples/active-search/

This is purely declarative htmx that enables a UI pattern that most developers would assume requires that they write javascript.

Of course there are going to be situations when a purely hypermedia-based solution isn't going to work and you will need client-side scripting. VanillaJS works fine for many of these (htmx has an extensive event model for you to hook into.) A lot of people like AlpineJS, which is a great library. And, if you are adventurous, you can give hyperscript a try for these needs.

But that shouldn't be confused with htmx, which provides a lot of functionality out of the box as purely hypermedia-oriented extension to HTML.

As an aside, with VanillaJS you can't simply use an "on" attribute for non-DOM events, which is why people like solutions like Alpine or hyperscript, which offer general event handling inline on elements.

Re: Ask HN: Experiences w “JS-free” front ends? (Hotwire, Unpoly, Inertia.js, htmlx)

#32

Maybe you mixed up Inertia.js [0] with Livewire [1]? I've worked with Livewire quite a bit and think it's a brilliant concept. It's very easy to get started and you get great results without much training. However, as soon as you encounter problems or want to implement things that deviate from the standard case, you quickly realize that this is a new technology. There isn't a solution for every problem on Stackoverfl…

I'm curious about this. Can you share any specific problem you had and couldn't find a solution for?

Re: Ask HN: Experiences w “JS-free” front ends? (Hotwire, Unpoly, Inertia.js, htmlx)

#34

I've built a small project management system (as I was in need of a custom one) with Unpoly as a proof of concept. And, oh boy, it was easy and fast. I have a previous experience with VueJS and Django REST Framework. It is nice but it's a whole other kind of work. Too many build tools, CIs, State Management hell... I'll, if I can, keep developing with the new-new stuff (Unpoly and htmx). Probably won't be 100% of the…

Unpoly rocks. Far better and more conplete than Htmx. Sadly not as good at marketing.

Re: Ask HN: Experiences w “JS-free” front ends? (Hotwire, Unpoly, Inertia.js, htmlx)

#35
post #5

As is so often the case, there's a lack of actual engineering in software "engineering". SPAs may be faster to develop and more performant or they may not. But simply declaring it to be so is not engineering. Extensive time is needed to make that determination and it must be based on an objective analysis of collected data.

SPAs faster to develop? We might live in different universes.

Re: Ask HN: Experiences w “JS-free” front ends? (Hotwire, Unpoly, Inertia.js, htmlx)

#36
post #32

Maybe you mixed up Inertia.js [0] with Livewire [1]? I've worked with Livewire quite a bit and think it's a brilliant concept. It's very easy to get started and you get great results without much training. However, as soon as you encounter problems or want to implement things that deviate from the standard case, you quickly realize that this is a new technology. There isn't a solution for every problem on Stackoverfl…

I'm curious about this. Can you share any specific problem you had and couldn't find a solution for?

I don't remember exactly. I was missing a very specific feature and didn't find any information about it in the documentation or elsewhere, although it's probably a frequently requested issue. Only after a long search did I find a hint in the Github discussions that led me to the solution. For similar problems with more established technologies, you can usually find a blog post or a Stackoverflow post about such things within a very short time, often even with a code example that you can copy and paste. With Livewire, this is often not the case.

Edit: To be clear, there was a solution, a very good one indeed. It was just hard to find.

Re: Ask HN: Experiences w “JS-free” front ends? (Hotwire, Unpoly, Inertia.js, htmlx)

#37
post #32

Earlier quoted context omitted.

I'm curious about this. Can you share any specific problem you had and couldn't find a solution for?

I don't remember exactly. I was missing a very specific feature and didn't find any information about it in the documentation or elsewhere, although it's probably a frequently requested issue. Only after a long search did I find a hint in the Github discussions that led me to the solution. For similar problems with more established technologies, you can usually find a blog post or a Stackoverflow post about such thin…

The problem with these generic explanations is that we can't know if it was a real issue with the tool, if it was a misunderstanding of how to use it from your side, a problem with documentation, a third party plugin, etc.

This is like saying "React is bad because once I had a problem I don't remember".

Re: Ask HN: Experiences w “JS-free” front ends? (Hotwire, Unpoly, Inertia.js, htmlx)

#38
post #34

I've built a small project management system (as I was in need of a custom one) with Unpoly as a proof of concept. And, oh boy, it was easy and fast. I have a previous experience with VueJS and Django REST Framework. It is nice but it's a whole other kind of work. Too many build tools, CIs, State Management hell... I'll, if I can, keep developing with the new-new stuff (Unpoly and htmx). Probably won't be 100% of the…

Unpoly rocks. Far better and more conplete than Htmx. Sadly not as good at marketing.

Rather than "complete" I would say "high level".

htmx is a relatively low level extension to HTML, by design. Unpoly offers a lot more structure, such as layers, which you would need to implement on your own or using another library (e.g. tailwinds or bootstrap) if you are using htmx.

This is reflected in their overall sizes: 11k for htmx, 41k for unpoly.

I don't view either as better in general: they are two different approaches to building hypermedia-oriented applications, one more structured and one less. Which one is better for your particular application depends on your own engineering needs and tastes.

Re: Ask HN: Experiences w “JS-free” front ends? (Hotwire, Unpoly, Inertia.js, htmlx)

#39
post #34

Earlier quoted context omitted.

Unpoly rocks. Far better and more conplete than Htmx. Sadly not as good at marketing.

Rather than "complete" I would say "high level". htmx is a relatively low level extension to HTML, by design. Unpoly offers a lot more structure, such as layers, which you would need to implement on your own or using another library (e.g. tailwinds or bootstrap) if you are using htmx. This is reflected in their overall sizes: 11k for htmx, 41k for unpoly. I don't view either as better in general: they are two differe…

Yes, I agree with your explanation. I should have said "far better for my own preferences". I agree that probably you can implement a lot of what Unpoly provides starting from HTMX

Re: Ask HN: Experiences w “JS-free” front ends? (Hotwire, Unpoly, Inertia.js, htmlx)

#40
post #39

Earlier quoted context omitted.

Rather than "complete" I would say "high level". htmx is a relatively low level extension to HTML, by design. Unpoly offers a lot more structure, such as layers, which you would need to implement on your own or using another library (e.g. tailwinds or bootstrap) if you are using htmx. This is reflected in their overall sizes: 11k for htmx, 41k for unpoly. I don't view either as better in general: they are two differe…

Yes, I agree with your explanation. I should have said "far better for my own preferences". I agree that probably you can implement a lot of what Unpoly provides starting from HTMX

No problem at all: unpoly is a great piece of software and I very much understand being a passionate fan of it. The approach Henning took is quite ingenious.
Post reply on HN