Earlier quoted context omitted.
Thankyou for the awesome library! I have a question. Is there a way to use HTMX with minimal server side changes. Specifically if I have an existing page that you fill in a form and submit and response is of course the entire page. I think it would be cool to tell htmx that the whole page is being returned BUT I only want to update #my-form and that way you don’t need any “if htmx request” kinda stuff on the server.…
I'm not sure about HTMX, but this kind of behaviour is what Unpoly https://unpoly.com/ excels at I played with it recently and it was pretty easy to enhance a completely non-js CRUD type app and have it fall-back gracefully. Seems a similar concept to HTMX but has a more batteries included / high-level approach.
Show HN: I made a HTMX Playground 100% in the browser
81–90 of 126 posts
Re: Show HN: I made a HTMX Playground 100% in the browser
#82Finally a way to use HTMX as a SPA framework ;)
Re: Show HN: I made a HTMX Playground 100% in the browser
#83Is Htmx just the long overdue successor to DHTML that was all the hype in, say, 1997?
Re: Show HN: I made a HTMX Playground 100% in the browser
#84Earlier quoted context omitted.
This is a great question. I love htmx but in situations that have to work offline I can't use it. Would be a great hack to be able to just run your server code in a worker.
> Would be a great hack to be able to just run your server code in a worker. This is exactly why some people build heavy offline-first SPAs in JS. HTMX tries to avoid this entirely. Conceptually (seen from the perspective of HTMX), it makes zero sense to put the server code in a worker and run a client-server architecture in the client‘s browser. This would be an over-engineered thing that HTMX explicitly tries to av…
Re: Show HN: I made a HTMX Playground 100% in the browser
#85I was seriously thinking about using HTMX myself, but I'm kinda scared it's developer pool seems too small to hire devs from. I'm used to proprietary frameworks, in my case I worked with intershop which uses isml. (this is comparible to something like thymeleaf). In recent years we tried to move away from this approach and go to the angular front end Stack because it's easier to hire a dedicated frontend developer th…
https://risingstars.js.org/2023/en#section-framework
Just behind react and ahead of vue, svelte & angular. So the future looks promising in that regard (although I do expect it to drop back after the initial excitement dies down).
htmx is pretty simple, most web developers can pick it up in a day or so. It does require a mental shift for both developers as well as PM/architects in how development is done, because it pushes the organization more towards a full-stack paradigm, with developers owning whole features rather than "front end" and "back end". We have a book, free online, you can read, that will help with this:
In addition to the docs (https://htmx.org/docs, which should take about an hour to read) we also have a bunch of essays on both philosophical & practical issues around htmx & hypermedia in general:
htmx tries to be "scaleable" in that there are very few base ideas to the library and you can use only a few of them to implement useful behavior (e.g. lazy loading, to pull a section of a page out of the critical first-paint path, is two attributes: https://htmx.org/examples/lazy-load) but then it provides enough hooks and deeper features (e.g. events, event filters, etc.) that as you get deeper into it you can accomplish what you want.
finally, with respect to spaghetti code, this is a perennial danger in all software development. My admittedly limited experience with SPA libraries has not convinced me that they prevent spaghetti. w/htmx you want to focus your efforts on the back end and take advantage of whatever tools your server-side environment offers to properly factor your application. Because htmx allows you to pick any server side technology (SPAs put pressure on you to adopt JavaScript/TypeScript on the back-end, since you already have a large application written in them for the front-end) you have many more options & paradigms available for organizing the bulk of your application logic.
addendum: I should mention that i try to outline when htmx is a good choice for an application here:
https://htmx.org/essays/when-to-use-hypermedia/
htmx is a tool, a good tool in many cases, but just a tool, and i want to be clear that it isn't a silver bullet for web development
Re: Show HN: I made a HTMX Playground 100% in the browser
#86Nice! I have been using maplibre with django and htmx. I should try and put an example up there to share with others.
Re: Show HN: I made a HTMX Playground 100% in the browser
#87Earlier quoted context omitted.
> I'm kinda scared it's developer pool seems too small to hire devs from It is very straightforward to pick up. Unless you hire code camp devs who only ever learned React, no actual CS topics, anybody should be productive within at most a week.
While true this is divorce from organization’s hiring practices. I have to fill out a form to request someone and htmx won’t be on it. You will get someone who only know react and will stomp their feet as to why can’t we use react. A lot of bootcamp programmers are cert jockeys who don’t care or know about development, not that they can’t learn.
Re: Show HN: I made a HTMX Playground 100% in the browser
#88Earlier quoted context omitted.
On my android, I cannot type - the keyboard does not open. So it's read-only on my mobile. I think that was the problem with Monaco on mobile: the keyboard never worked correctly. That was my experience. Edit: I don't want to complain, Monaco is superb editor and it would be super if it worked on mobile consistently . But from the github issue, it appears that Microsoft doesn't seem to want to change that.
Super weird, I can type on Android, will try some other phones.
Re: Show HN: I made a HTMX Playground 100% in the browser
#89Earlier quoted context omitted.
I think you mention a very valid point that is worth reiterating: Even when you enter territory where HTMX gets cumbersome for some reason, you can still use custom JS or some other library to work around it. I admit that I initially started to use HTMX to avoid JS, but I am now more comfortable than ever before to fall back to some lines of Javascript in the few cases where HTMX does not feel like a great fit to sol…
> I admit that I initially started to use HTMX to avoid JS, but I am now more comfortable than ever before to fall back to some lines of Javascript in the few cases where HTMX does not feel like a great fit to solve the problem at hand. Many people don't realize that great engineering happens under constraints. When you're faced with an empty project and the full power of JavaScript, you have 5,000,000 ways to do som…
Re: Show HN: I made a HTMX Playground 100% in the browser
#90hey there, I'm the creator of htmx, and I really appreciate you making this! very cool!