6 ms·
I’ve also noticed a rise in programming content creators discussing it. I’ve also explored it briefly a couple days ago (with a Go server) and it’s actually re
by absoluteunit1 3y ago
I’ve also noticed a rise in programming content creators discussing it.
I’ve also explored it briefly a couple days ago (with a Go server) and it’s actually really really convenient to work with.
My next project will definitely be in Go + htmx + tailwind and MySQL/PostgreSQL
I’m excited about working with plain html again and not having to deal with over bloated js projects.
Dependency issues will be a thing of the past
- robertoandred 3y agoNo dependencies, except for htmx and whatever else you need to make it work.
- yawaramin 3y agoWe didn't say 'no dependencies', we said 'dependency issues'. Htmx is a single <script> tag in your page, your custom JS is another one. That's it, unless you have specialized needs that can only be solved by more client-side JS.
- afavour 3y agoNo one said no dependencies. htmx itself has no dependencies which would make me a lot more comfortable adding it to a project.
- absoluteunit1 3y agoSorry for confusion; when I said “dependency issues will be a thing of the past” I was referring to large js projects where your dependency list is 50+; updating one dependency to a new version can be a very cumbersome task Using htmx will be breath of fresh air if you’ve ever had to deal with complex dependency issues
- DoesntMatter22 3y agoI used it on a project and I liked it but then I got into situations where I needed to pass a bunch of data back to the rendering page and it got really messy. The author says on the HTMX page that if you have this type of situation then HTMX is probably not the greatest fit. Also as the project got larger there was a lot of issues with like "Wait, why isn't this loading? Oh man someone changed the name of a div I was using". It's just not as clear when things stop working compared to most JS frameworks (which I hate, hence my interesting in HTMX). I think for smaller projects it can be decent though.
- arcanemachiner 3y agoI think it would be a good idea in these situations (many cooks in the kitchen) to use a data attribute for each HTML element that uses HTMX, such as `data-htmx-id` to reference your elements instead of just using the `id` attribute (which already carries a lot of contextual baggage). This would solve a couple potential issues: - Identifying that the element is used for HTMX swaps - Warning anyone that changing this attribute will break said HTMX swap
- DoesntMatter22 3y agoSure, there are ways to work around it but it's just fairly brittle in that way, those measures help but on a large project people are going to be breaking things relatively frequently.
- deleted 3y ago[deleted]
- mostlysimilar 3y ago> I got into situations where I needed to pass a bunch of data back to the rendering page and it got really messy. Could you not fetch that data separately from the patterns htmx provides and do some light parsing/rendering logic client-side?
- DoesntMatter22 3y agoThat data needs to go to the page itself. Like you need to pull data that is on the main page and send that data down to the modal form submission. That is tricky. Is it doable? Yeah, it can be done but it's really ugly at that point.
- a_subsystem 3y agoThe data was on the server at some point to begin with. How could it be tricky to put it somewhere just because $component is a modal?
- ricardobeat 3y agoIf you’re aiming for simplicity, how did tailwind make it to the list? Why not use plain CSS?
- codemonkey-zeta 3y agoNot OP, but for me but for me it eliminates one more decision - naming. I don't want to think about class names or follow a convention like BEM (and probably set up linter rules so I don't do it wrong). I like sscs / BEM in some projects, but it's just one more thing to think about. With utility classes you don't think about it, you style the page as you go inline in the class attribute. The biggest hurdle is learning the utility class names, but there are good cheatsheets for that and my editor already autocompletes all the tailwind classes for me, plus whatever other classes I may have defined. I think HTMX and tailwind fit well together because I also see HTMX as a kind of "utility framework". It augments the standard html elements with additional capabilities using attributes and HATEOAS.
- Brajeshwar 3y agoIf you are not writing S/CSS or styling anything beyond what Tailwind/Boostrap (or other frameworks) already has, then it is as simple as it gets. The last time I was involved (actually writing) in a Tailwind project was in 2018. However, today, I can just look at the documentation and do a design all the way without writing any S/CSS at all.
- absoluteunit1 3y ago^This. After using it for the first time in my last next js app; played around with the basics of tailwind when I built typefaster.app and it’s my favourite css library. Also, their discord is very active and very very helpful
- a_subsystem 3y agoLive reload means I can inline edit classes as styling to quickly create components and not have to context switch to a css file/section. It feels easier to create structure and style as I go.
- wild_egg 3y agoGo + htmx + tailwind + SQLite is my current stack and it's the most enjoyable web dev experience I've had in a decade. SQLite adds an extra level of simplicity and convenience that I can't endorse enough
- hospitalJail 3y agoI wonder how much of this is familiarity. I grew up in the LAMP world, throw in laravel, and I can basically copypaste and whip stuff up. I know Apache isnt cool anymore, but I can do all sorts of crazy stuff with it after using it for 15 years. I'm not opposed to change from mariadb/mysql since the syntax is the same. I dread switching from laravel though. Maybe I should since I hate debugging php... and Laravel major versions are so destructive that basic outdated tutorials will have you frustrated.
- absoluteunit1 3y agoI’ve only been professionally developing for 3 years now and I’m starting to realize it’s all about familiarity; I think of it as “wear whatever shoes fit you best for the marathon” I mentioned Go + htmx in my original comment because I use Go at work and we do a lot of templating with the .gohtml and I absolautly love it. The ecosystem of go is what I love about it most Although I do get tempted by shiny things often; I try to remind myself to stick to a couple tools/languages
- absoluteunit1 3y agoOn interesting I like SQLite; i never thought to use it for web projects though. Any tips or advice on trying to use SQLite for web dev? What platforms do you use for deploying web apps with SQLite ?
- andrewfromx 3y agoCorrect me if I’m wrong but sqlite has no support for concurrent users right? You would have to have a mutex or queue system in production to make sure only one thing at a time tries to run sql?