https://htmx.org logo
Join Discord
Powered by
# htmx-general
  • e

    echoing-nest-31408

    08/24/2022, 3:28 PM
    Oh, just found this, probably same issue: https://github.com/bigskysoftware/htmx/issues/112
  • e

    echoing-nest-31408

    08/24/2022, 3:54 PM
    Possible theory: when max attribute is set on a number field, and that value is exceeded, then htmx breaks. Quick test suggests this is the case.
  • e

    echoing-nest-31408

    08/24/2022, 3:54 PM
    I posted this on the github issue too. I'm heading off to bed, but just wanted to mention here too.
  • e

    echoing-nest-31408

    08/24/2022, 3:55 PM
    max="300" -- so if I enter any values up to 300, inputs trigger requests. I put in 301 into that number input, and no more inputs trigger a htmx request.
  • s

    square-manchester-95442

    08/24/2022, 3:58 PM
    Just wanted to say I really like Htmx, I’m using it to build a MVP with Java and Thymeleaf and it’s great
  • s

    square-manchester-95442

    08/24/2022, 3:59 PM
    I’m also going to try to implement some animations on events using hyperscript in the next few days
  • s

    square-manchester-95442

    08/24/2022, 4:10 PM
    My main problem was that I had to quickly build a product but I mainly work on backend usually. Tried to see the SPA framework landscape but as a backend engineer it’s pure hell, there are things I really can’t swallow such as the authentication process which is really a long and twisted process on a SPA while you can achieve the same result in 10 minutes using spring boot (and it’s probably even more secure and less risky on the long run to maintain)
  • s

    square-manchester-95442

    08/24/2022, 4:11 PM
    Using thymeleaf + tailwind + htmx I’m really satisfied about how it’s turning out
  • s

    square-manchester-95442

    08/24/2022, 4:23 PM
    I read some articles you linked here and I agree, sometimes people love to make complex choice where it’s totally not needed. When you have to quickly build a MVP for a startup to prove the riskiest areas of a possible business, what you can achieve in 2 weeks of work would require at least 4/6 using a complex stack, I don’t get the point of using SPA and Microservices at this time (and at this point if Htmx could replace SPA I don’t get the point of using SPA even later of your business it’s not a game or highly interactive app) 1) when you are basically trying to validate a business model that can change over time refactoring Microservices becomes pure madness as your domain could change several times in a single month 2) if your startups fail you ended up wasting many hours building a complex stack when you could have reached the same result in less time using php, spring boot and similar
  • m

    mysterious-toddler-20573

    08/24/2022, 4:25 PM
    🙂 one strong argument in favor of SPAs: you can always hire react developers
  • s

    square-manchester-95442

    08/24/2022, 4:28 PM
    True but you can hire them at a later time after your business is completely validated and the startup is eventually funded
  • s

    square-manchester-95442

    08/24/2022, 4:29 PM
    As a backend developer I enjoy more templating on thymeleaf when needed
  • s

    square-manchester-95442

    08/24/2022, 4:30 PM
    And luckily I came across to htmx reading an article last week
  • l

    late-king-98305

    08/24/2022, 4:32 PM
    The big payoff with SPAs, IMO, is the small network payloads that are exchanged. An htmx payload could end up being double to 3x its size - but, when you're in the single-kilobyte range, it's really not a problem. Plus, you save processing the response once it's received; all you have to do is render.
  • s

    square-manchester-95442

    08/24/2022, 4:33 PM
    Anyway if I’m not mistaking you could even set up a complete Microservices architecture with Java and Thymeleaf, where each Microservices have their classes and templates. In this way you can avoid breaking Conway’s law
  • l

    late-king-98305

    08/24/2022, 4:33 PM
    There are some benefits in reusability among components, but you can get the same thing server-side. Not having to have a server and client representation of your API calls is also a huge complexity eliminator!
  • s

    square-manchester-95442

    08/24/2022, 4:33 PM
    Of course when the business grows
  • l

    late-king-98305

    08/24/2022, 4:36 PM
    IOW, (again IMO) you'd have to be pretty darn big to need to shift from htmx to something else -and, even then, you might still be better off hiring HTML people and teaching them. (I'm bullish on htmx.)
  • s

    square-manchester-95442

    08/24/2022, 4:36 PM
    You are right on payloads, but I think we are approaching an era where this is getting less of a problem, especially when 5G will be available worldwide
  • l

    late-king-98305

    08/24/2022, 4:37 PM
    Right - that's what I was trying to say. The "but the payload size!" argument isn't a good one against htmx. 🙂
  • m

    mysterious-toddler-20573

    08/24/2022, 4:50 PM
    I tend to think that payload size is dominated by network latency and any backend network connections (e.g. a datastore) in most systems
  • m

    mysterious-toddler-20573

    08/24/2022, 4:50 PM
    Rich Harris says that edge computing is going to be the final nail in the coffin of the JS resistance, but I'm not so sure
  • h

    hundreds-camera-24900

    08/24/2022, 5:08 PM
    Does the back cache update when the server returns a 302?
  • h

    hundreds-camera-24900

    08/24/2022, 5:09 PM
    I'm seeing form submit with errors -> display errors to user -> good submit -> redirect to success page -> back brings me back to the "display errors to user" state vs where it was at when the good submit happened
  • m

    mysterious-toddler-20573

    08/24/2022, 6:01 PM
    🤔
  • m

    mysterious-toddler-20573

    08/24/2022, 6:02 PM
    It doesn't update
  • m

    mysterious-toddler-20573

    08/24/2022, 6:02 PM
    Maybe we should have a header
  • m

    mysterious-toddler-20573

    08/24/2022, 6:02 PM
    "nuke cache"
  • m

    miniature-controller-37356

    08/24/2022, 8:49 PM
    Anybody knows a NPM package that can do server-side rendering like Django / something that can achieve including other HTML snippets in a bigger HTML like
    {% include component/_test.html %}
    ?
    Copy code
    html
    <body>
      <div>
        {% include component/navigation.html %}
        {% include component/profile1.html %}
        {% include component/profile2.html %}
        ...
      </div>
    </body>
  • f

    famous-area-94520

    08/24/2022, 8:54 PM
    https://eta.js.org/
    Copy code
    erb
    <body>
      <div>
        <%~ await include("component/navigation.html") %>
        <%~ await include("component/profile1.html") %>
        <%~ await include("component/profile2.html") %>
        ...
      </div>
    </body>
1...796797798...1146Latest