Threads like these make me glad I’m not a frontend dev. Just looking at the comments it’s clear there is no cohesive view or vision or agreement. One giant Tower of Babel
Please just try HTMX
501–510 of 530 posts
Re: Please just try HTMX
#502Earlier quoted context omitted.
> it becomes an issue when my product owner tells me that I need to do some funny dynamic thing Okay, but on the other hand maybe you should do the right thing and say no.
I agree that one should push back, but I suspect we have different notions of when to do that (which is fine, my approach here is not fixed in stone). Making a page needlessly dynamic would be a concern for me if it violates business rules or for whatever reason harms the overall system. But if it doesn't do that, and it genuinely does make the business and users happy, then I'm happy to do it and then get a bit of l…
But you have no idea if it does that, you just have the word of the PO who's not actually building anything, they're at best just copying what others are doing (ie being derivative) or at worst just doing guesswork.
How about offering an alternative: a UI/UX that takes the web as it is, a primarily document-based format with navigation and data entry? A lot of cool stuff can be built on top of that.
Re: Please just try HTMX
#503I would recommend https://data-star.dev over htmx. It is more complete. But it depends on what you are building. Datastar does everything that htmx can do and much more.
Re: Please just try HTMX
#504I just don't like having to send HTML and have the backend deal with what are really frontend problems. Sending JSON is great since you can serialize most reasonable data types into it and then the backend has no responsibility for how it is rendered which helps for having mobile apps use the same backend as the website. Sending HTML just seems nuts since if you change your design you would have to change the backend…
Re: Please just try HTMX
#505What's the grug brain method of "live updating list with a search bar". I tried htmx sse but it turned out to be not that great. I was hoping I could model it as a single request/response cycle like a traditional page post, with the astericks that the single response is actually a stream of responses. Clicking search or whatever again "just" axes the old request and sends another one with the updated parameters. Perh…
Re: Please just try HTMX
#506Earlier quoted context omitted.
What are you guys talking about. It automatically redirects to the HTTPS version and the cert is signed by Let's Encrypt.
You are late to the party, and it's already fixed. > It automatically redirects to the HTTPS version That's your browsing doing the job, not how the site is set up.
Re: Please just try HTMX
#507Earlier quoted context omitted.
But the front end code is in one place, and that place is the server. It is true, though, that the experience greatly benefits the easier it is to manage and return partials from backend code. Some frameworks make it harder than others.
I'd rather have the often loaded static html running on a server that is optimised for that job, or served from a cache close to the user. The backend can then just serve up the dynamic content and be optimised for that job.
Re: Please just try HTMX
#508Earlier quoted context omitted.
In the simplest web server, the server returns HTML. Having the backend return JSON is where you're adding complexity. Your front end code won't even work without some base HTML.
Having the html stored both on a static html site that can be cached and in the code base of a backend server is more complex to me than keeping these concerns separate.
Re: Please just try HTMX
#509If you don't need React, you probably don't need a framework anyway. The reason I use React is to create components that can exist on their own (and can be constructed/visualized on a StoryBook) and these components will then play nice with other React components. And then use JSX to make reasoning about the code simple. That's not what htmx is. > htmx is a library that allows you to access modern browser features di…
Re: Please just try HTMX
#510Earlier quoted context omitted.
> Resume-driven development should not be a thing. Pretend this is not about library choice, but rather about language choice. One language has 2 jobs, and the other language 13k jobs. I doubt you'd think for more than a second.
> One language has 2 jobs, and the other language 13k jobs. I doubt you'd think for more than a second. The Hacker News website runs on Lisp. How many jobs do you see on the market that ask for Lisp? And yet, for what it is, this site is amazing! I don't see them rushing to migrate to a python backend and a react-based frontend, no matter how many jobs there are for those.