Skip Navigation
4 comments
  • htmx extends and generalizes the core idea of HTML as a hypertext, opening up many more possibilities directly within the language:

    Ok...

    • Now any element, not just anchors and forms, can issue an HTTP request
    • Now any event, not just clicks or form submissions, can trigger requests

    That's AJAX.

    • Now any HTTP verb, not just GET and POST, can be used

    Is that a good thing?

    • Now any element, not just the entire window, can be the target for update by the request

    That one is interesting... but kind of flies in the face of any adblockers or client-side content modifiers. What happens when the target for a response got removed from the DOM by the client?

    PostgREST

    Direct database access with no input sanitization?

    Using database functions for running application logic? Every backend developer now needs to be a DBA?

    What about error handling? Doesn't it expose too much of the internal structure?

    provides a natural way to do API versioning

    Hm... it sounds to me like all versioning inherits the caveats of schema migrations, am I missing something?

    • That's AJAX

      Yes, and that's what is shown in this article.

      ... return HTML content and use the htmx library to handle the AJAX requests

      htmx is not meant to do anything fancy that you can’t do with Ember/Angular/React/Vue/etc.

      htmx is simpler though and has a few benefits as I see it, compared to those frameworks:

      • No duplication of data models and routing, and all business logic stays on the server-side where it belongs.
      • No build step, no dependency hell, and no outrageous churn; just include one JS file that browsers should be able to run indefinitely.
  • PostgREST is pretty cool but I can never figure out a use case for it. You want something that's not too cold, doesn't interact with other systems, and it's worth it the additional security effort for configuring postgres.

    I think people also widely misunderstand how it works, which doesn't help if course. It's not just a database you can access on the internet, there's a while bunch of security you set up first, and it uses the native row based security features to separate users' data.