Htmx in a Nutshell
71–80 of 414 posts
Re: Htmx in a Nutshell
#72Re: Htmx in a Nutshell
#73If you just want to use plain HTML with JavaScript, take a peek at Joystick [1]. 100% plain HTML, CSS, and JavaScript based components (zero attribute hacks or compiler tricks). No external libraries for basic functionality (state, data fetching, url handling—all included or relies on native browser functionality). All a part of one full-stack framework that works out of the box. [1] https://github.com/cheatcode/joys…
Re: Htmx in a Nutshell
#74I 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 am so tired of everyone complaining about complexity in front end frameworks, as if this sort of thing doesn't exist in other languages and stacks, and as if frontend dev isn't as complex as other domains. Just ignore them or do something else.
Re: Htmx in a Nutshell
#75Like: what's the point of using this over HTML5+js? I've spent 15 minutes reading the website and I still don't understand why I should want this, especially if I already know HTML/CSS/JS. All it seems to do is add a SGML DSL into your HTML, so you can be all declarative about `onclick` attributes.
I am sure I'm missing something - what is it?
Re: Htmx in a Nutshell
#76I want to like - I feel like the frameworks are all too much ceremony now. You need to buy into a bunch of different build tools, a cli or two, and are left wondering "where is my app again?" I've tried htmx, though, and like the simplicity, but am not 100% sold. In the olden days, ASP.NET Web forms Ajax had "Update Panels", which were similar to this. You'd wrap a section of markup in an "Update Panel" and that made…
Hypermedia APIs and JSON (Data) APIs are different. I have a few essays up on these differences here: https://htmx.org/essays/hypermedia-apis-vs-data-apis/ https://htmx.org/essays/splitting-your-apis/ Generally, I would recommend splitting your data and hypermedia APIs up, so you can take advantage of the features of hypermedia (the uniform interface) and still provide a good data API to clients that want it. Also, t…
Presumably these hypermedia endpoints are all equally accessible - couldn't the removal of one break another application if the latter app decided to depend on a particular hypermedia snippet from the first?
If there are multiple teams in an org that own HTMX endpoints, aren't the set of endpoints effectively a sort of interface boundary? Or is there a good way of declaring certain endpoints "private" and ensuring they're only fetched from particular applications? (Maybe separate domains for every app?)
Re: Htmx in a Nutshell
#77I don't know any javascript, but is it really that bad of a language that you need new libraries every day and workarounds so that you don't have to write it?
Re: Htmx in a Nutshell
#78> 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…
You can ensure you're always running the version of the script you validated, assuming you even validate the code (which presumably no one does).
Re: Htmx in a Nutshell
#79Earlier quoted context omitted.
https://htmx.org/docs/#parameters Simple doesn't mean "I should be able to intuitively understand this with under a minute of reading"...
With so many tools floating in this space the landing page MUST be clear enough. Sorry.
the link here is to the docs, which is more involved
Re: Htmx in a Nutshell
#80I've been picking up Python for the past 6 months and adding as little as possible and slowly as possible. About 2 months ago I started building a Twitter client with HTMx + Flask and it's been nice. It now supports multilogins for Twitter and Mastodon, as well as Twitter Archive and RSS/Atom backends. Very similar to programming with PHP back in the day. Minimal JS, just a couple functions to integrate with my little Notes app that's not running HTMx (yet). Not trying to boast, just showing how far one can take it.
Using the server as an engine of state with the Facade pattern is something I've already become happy to do, having successfully used it for a pretty delicate use case involving multiple iOS App Store versions and a backend migration without impacting old App versions. I'm a little cautious about offline apps (SPA-domain), but have done a Service Worker demo and have some ideas to mess around with in mind. It's the one possible downside to not using JS (Node) on the backend that I can see: no shared code that can run on the backend and client/edge alike (but a language subset transpiler fills in the gap, eg. for validation/pure/non-mutant logic).
Documentation is pretty clear as well, I've been able to go a long way just reading it over and over and trying out features as I think of them.