Live data from Hacker News

Htmx in a Nutshell

htmx.org

181–190 of 414 posts

Re: Htmx in a Nutshell

#181

howdy, I'm the creator of htmx, happy to talk about it

First, I'll preface this that what I'm about to write is meant as an endorsement of HTMX.

What HTMX does should've been a W3C standard a decade ago, and I've my fingers crossed that some day I'll be able to do what I've done with jQuery and remove it.

Thank you for pushing the state of the art forward in a meaningful (and RESTful!) way.

Re: Htmx in a Nutshell

#182
post #147

Earlier quoted context omitted.

It's just a JS library that attaches behavior to HTML elements based on attributes where you'd otherwise have to write a bunch of JS yourself. It's just a framework where all the metadata is just embedded in the HTML.

Yeah, but why? Why is it better to remember a bunch of attributes than to remember 3-4 javascript functions?

While I am just now discovering it so have not used it, I personally love this approach because it keeps the HTML syntax. It is like programming in two different languages when you only need one. Normally, you would add an onclick event handler to the element to call a function. Then, you scroll up to the function and back down to the anchor. Back up to the function. Back down to the anchor. This puts everything in one place with cleaner syntax.

Re: Htmx in a Nutshell

#183

Earlier quoted context omitted.

I'm not a java man but a quick google leads to a lot of "10 java frameworks you should know", "17 popular java frameworks", and a "list of java frameworks" on Wikipedia that's dozens long. Frontend wise it seems similar at a glance, in that you could use react for the last 10 years and be fine. Or you could jump from react to vue to svelte and make life hard for yourself.

I looked at some of the articles you mention and they are completely clueless They include stuff like - Hibernate - this is just an ORM - JHipster - this is just opinionated Spring - mybatis - again ORM - Grails - > This is Groovy and not Java - Play -> This is Scala primary - Primefaces -> an implementation of Oracle/JavaEE I think you get the idea. I am actually amazed at who is the target audience of this kind of…

Makes sense, probably just ad click driving spam page, appreciate the info :)

I wonder how much of people being burnout on "front end frameworks" is because of "17 must know javascript frameworks" articles akin to the JAVA stuff at the top of google.

Re: Htmx in a Nutshell

#185
post #100

I like gymzaal and hyperscript - they solve few cases but those cover something like 99% of what a average app needs. My biggest pain point lies with the docs, there are not many of them and it takes time to figure out what’s happening For example, there was no simple way to understand that both libraries are loaded correctly, also it wasn’t immediately obvious where to use htmx and where to start using hyperscript

but contrast that with the Herculean job that is learning angular, react or vue...

Re: Htmx in a Nutshell

#186
post #3

I am burnt out (but recovering!) with web dev and htmx is what I am using for my project. Django, DRF, Postgres, tailwind and HTMX. I am so tired of all the front end frameworks and all the complexity that gets added. At some point I think you need it and you get returns from it but hearing more people in the industry recognize and talk about how JS everything isn't always the answer gives me hope. I like what HTMX h…

I hear you loud and clear ! I wish I had known about it when I started my most recent project a yard and a half who.

Re: Htmx in a Nutshell

#187
post #66

> The fastest way to get going with htmx is to load it via a CDN HTMLX is great and all, but loading it from a CDN is insecure and wrought with problems. Namely, the JS file in question could be hijacked and replaced with a malicious version that can steal data. It's unlikely, but still a plausible scenario. Also: the resource could just 404 and not be available due to work-in-progress scenarios on the CDN side. I wo…

just download it and serve it from your own site.

Re: Htmx in a Nutshell

#188
post #73

Earlier quoted context omitted.

I had a quick look at joystick and wonder if you have even read anything related to htmx. Nothing against joystick but it seems more an alternative for frameworks like react and svelte. Those are also npm and jsx based. Htmx is nog ;)

Yes, I have. It was one of the things I looked at as part of my initial research before deciding to work on Joystick. What I don't like about is that it's a non-standards based pattern for implementing interactivity in HTML (the same reason I didn't like React, Vue, Svelte, etc). All of these frameworks try to wedge stuff in between the core languages of the web (HTML, CSS, and JavaScript) for the sake of speed/being…

Honestly, Joystick doesn't seem at all like React, Vue, or Svelte. You have a lot there in terms of email templates, database connections, and other "full stack" items that far exceed the scope of the others.

React is certainly a LOT more cognitive overhead than plain old HTML/CSS/JS. Vue, yes, to a lesser extent than React. But honestly, Svelte is closer to "just plain CSS and HTML" as I've even seen in a framework that also allows two-way data binding, which let's face it is a RPITA in vanilla JS. Automatic scoping of CSS to a component is also nice when you aren't trying to set a global style.

This by the way is coming from a guy who started writing for the web in 1996, back when document.write() was de rigueur. That said, I honestly do miss the old days of figuring out how to make something on a web page by simply hitting "View Source" and picking out the relevant tags.

Re: Htmx in a Nutshell

#189
post #3

I am burnt out (but recovering!) with web dev and htmx is what I am using for my project. Django, DRF, Postgres, tailwind and HTMX. I am so tired of all the front end frameworks and all the complexity that gets added. At some point I think you need it and you get returns from it but hearing more people in the industry recognize and talk about how JS everything isn't always the answer gives me hope. I like what HTMX h…

Can I ask you how long you have been using this stack for and what are your findings ? Do you have a complex UI heavy application and can you deterministically say that this stack can replace frameworks like React/Vue for JS heavy frontend ? Is HTMX really mature and stable for production and massive UI heavy apps ? I am asking because we are starting a big project in Django, Postgres, Tailwind and for frontend, stil…

[deleted]

Re: Htmx in a Nutshell

#190
post #3

I am burnt out (but recovering!) with web dev and htmx is what I am using for my project. Django, DRF, Postgres, tailwind and HTMX. I am so tired of all the front end frameworks and all the complexity that gets added. At some point I think you need it and you get returns from it but hearing more people in the industry recognize and talk about how JS everything isn't always the answer gives me hope. I like what HTMX h…

Can I ask you how long you have been using this stack for and what are your findings ? Do you have a complex UI heavy application and can you deterministically say that this stack can replace frameworks like React/Vue for JS heavy frontend ? Is HTMX really mature and stable for production and massive UI heavy apps ? I am asking because we are starting a big project in Django, Postgres, Tailwind and for frontend, stil…

Not sure what you mean by "heavy" frontend, but you might want to look into LiveViewJS (and/or similar) if there's a lot of frontend iteractivity, but you still want to do most of the logic/interaction on the backend.

I don't have much experience with HTMX, but it seems to be aimed at sites with a little bit of interactivity, especially if you want to be "forced" to maintain compatibility with no-js. (I mean "forced" in the positive sense. It keeps you honest.)

Post reply on HN