• ☆ Yσɠƚԋσʂ ☆@lemmy.mlOP
    link
    fedilink
    arrow-up
    0
    arrow-down
    2
    ·
    1 year ago

    HTMX isn’t really all that fresh as it’s basically the same thing as hotwire in Rails that’s been around for a long time now and this approach has been successfully used for lots of real world applications. This tool has very much been proven, and the approach is well understood along with its strengths and weaknesses compared to SPA style apps.

    HTMX is not a framework either, it’s literally just a way to update the DOM on the page dynamically. The whole point of HTMX is that all the logic lives on the server, and the server simply sends back the HTML that needs to be updated on the page.

    I’ve also never had any problems working with teams or hiring using niche technology. As I’ve mentioned, I primarily work with Clojure which is a niche language, and it’s just not a real problem in practice. In fact, I’d be very suspicious of working with people who aren’t capable of learning a new language or a library. Learning things and figuring out problems is the core competence of a software developer, and if they’re not able to learn new things I’d be very suspicious of working with them.

    HTMX also has nothing to do with type safety because it’s a protocol for hinting what pieces of the DOM the client needs to update when in HTTP responses. I have absolutely no idea what you’re trying to say regarding type safety here. Again, HTMX is not a js framework, it’s a light weight library for patching in HTML into the browser DOM. That’s all it does.

    And I really have no idea why you keep referring to HTMX as a hobbyist tool. It’s a widely used tool that’s used by large companies to make real world apps. It might be a new thing to you, but it’s certainly not a shiny new thing that hasn’t been used in anger.

    The comparison between .NET and HTMX is also nonsensical given that you could use HTMX with a .NET backend just fine. Again, HTMX is a tiny library that just patches things into your DOM. It’s not a frameworks, it’s not a language, it’s not a runtime. It’s just an extension on top of HTTP requests.

    The advantage of HTMX is precisely that you don’t need a frontend framework, and you can just keep all your state on the server resulting in a much simpler application. The main disadvantage of HTMX is that the state lives on the server. If you’re in a scenario where the UI has a lot of interactivity, or where you want to do horizontal scaling on the backend, that’s where SPA would be a better fit.