1. 61
    1. 36

      hello, not sure what the culture is here since i’m new, but i’m the creator of htmx and I’m happy to answer questions

      1. 12

        Examples of sites created with this? I did look, but I didn’t I need anything but the little demos.

        1. 2

          I built leaddyno.com with the predecessor, intercooler.js

          https://commspace.co.za is a sponsor and is built with it.

          We picked up JetBrains as a sponsor this year, which I hope is a pretty good vote of confidence…

      2. 8

        not sure what the culture is here since i’m new

        Mostly friendly and dogmatically anti-SPA.

      3. 0

        I went looking for an IRC channel for htmx; found none. #htmx on Libera is utterly empty. Clicking around, I eventually find the Talk page which tells me your community uses Discord. No thought of even having an IRC-Discord bridge?

        1. 1

          We’ve talked about it. I’m boomer-tier when it comes to this sort of stuff, even getting a discord set up was an monumental technical achievement for me.

          There is another guy who works w/ me on hyperscript mainly and his long term goal is to get us moved over to matrix.

    2. 10

      A simpler front end allows you to save your complexity budget for the back end functionality that differentiates your application from others.

      That implies that front ends aren’t usually a standalone differentiator. That seems strangely correct. Companies have generally avoided putting all their IP into plaintext javascript sent to the client.

      1. 1

        That seems strangely correct.

        What’s strange about that?

    3. 6

      Why should only <a> and <form> be able to make HTTP requests?

      Why should only click & submit events trigger them?

      Why should only GET & POST methods be available?

      Why should you only be able to replace the entire screen?

      I was reading the article and wanted to check also the homepage of the project, so I clicked on the logo with middle button of my mouse. Nothing happened… despite the fact that the cursor (hand) seemed that it should behave like a standard link. But it might be just a random bug not a design flaw…

      1. 11

        I clicked on the logo with middle button of my mouse. Nothing happened…

        Out of interest I went to see what happens for me, normal click loads the homepage as I’d expect. cmd-click opened the homepage in the current tab, not in a new tab. That’s not behaving like an <a> link, which makes this worse than styling/moving an <a> around for me.

        Downside of replicating native behaviour, all the “weird edge cases” are actually used by people who then notice when they’re missing.

      2. 8

        Looks like that was some older junky code on the logo, it was switched over to a straight boosted link and should work as you expect now.

        1. 2

          Thanks, it works now.

      3. 2

        Using Firefox 102.0.1 on Linux, left click goes to the homepage, middle click opens in new tab, ctrl+left click opens in new tab. Not sure what happened with your interaction.

        1. 5

          It looks that they fixed that pretty fast:

    4. 4

      For blogs yes, but if you’re building an Application (A in SPA), well. JS and all this fancy bi-directional data building, react(or whatever) components, state/cache is essential.

      1. 17

        I think it depends. There are lots of apps for which an SPA framework is overkill, and lots of places within an app for which an SPA framework might be better where, none the less, that SPA framework is overkill.

        Something like gmail or twitter could be built in htmx, because those are mostly text-and-image type websites amenable to what Roy Fielding called “coarse grain hypermedia exchanges”. Something like google sheets, not so much, because there are a lot of inter-UI dependencies that are complex, and you don’t want to introduce network calls on every recalculation of your sheet. On the other hand, the settings page of google sheets might be more simply done in htmx, which can save your complexity budget for the parts of the app that require a more complex solution.

        1. 1

          I don’t know much about htmx, but it seems that if it really is just hypertext, it could be used to in conjunction with SPA frameworks to reduce their “size”.

          1. 1

            Yep, you can use htmx for the more straight forward areas of the application that are amenable to “coarse grain hypermedia exchanges” to use Roy Fielding’s phrase, and then use an SPA framework where that level of interactivity is needed.

    5. 3

      “An” SPA implies the author doesn’t say spa but es-pee-ay. I was not aware some folks treated the word not as an acronym but as an initialism.

      1. 39

        Never in my life have i thought about pronouncing SPA as a spa instead of as an acronym.

        1. 5

          Exactly. How would you verbally compare and contrast an MPA vs an SPA in the same sentence? Spas and em-pee-aye’s? Spas and m-pas? It doesn’t make sense!

          1. 7

            Never in my life have I used the term MPA. :-)

            I think I would call the opposite (server side) template rendered sites.

          2. 4

            Mpa pronunciation should be something like m̩ːpɑː.

      2. 4

        I typically pronounce it as an initialism, but I have to admit when I wrote that title it looked funny and I switched back and forth a bunch of times. I eventually just went with the way I would say it in conversation.

        1. 1

          In cases like that, rewrite: The SPA Alternative. It also makes your thing sound like it’s the one true solution.

            1. 1

              Okay fine, “An Alternative to SPA”. But you need to work on your marketing.