@alcinnz Love this article. Thank you for sharing!
Under the “no solutions” section, I’ll suggest https://htmx.org as a potential option. Yes, #htmx socials are filled with silly memes, but that’s only to reinforce the point that today’s “front end” devs have taken themselves way too seriously.
The library itself has been a breath of fresh air for me, in an otherwise absurd world where simple things are obfuscated into oblivion by layers of meaningless abstractions.
If there was an #HTML element that changes it's content when users interact with other elements on the page, what name would it have?
PLEASE NOTE: I am not suggesting that this element needs to exist; I am only asking what it would be called. I'm building a CustomElement, I just want it to have a name that makes sense.
Vote and suggest others in replies. Please boost for reach!
Round 2; because I've gotten some good suggestions
This <HTML> element updates itself with the result of an HTTP request that some other element on the page made. It can replace, append or prepend it's contents.
No todos los días veo una charla y me hace cambiar de opinión sobre una tecnología o enfoque:
«From React to htmx on a real-world SaaS product: we did it, and it's awesome!» https://www.youtube.com/watch?v=3GObi93tjZI #python#django#htmx
Forma parte de las charlas que se dieron en DjangoCon 2022.
Me ha sorprendido gratamente el enfoque de crear componentes en Django que sean renderizados a través de eventos de htmx.
Getting used to the #HTMX mental model of "every request returns an HTML response" can be difficult if you're used to just getting pure data back.
Amazingly, getting an HTML response makes it SO much easier to implement my rotation timer, because I can "calculate" the precise HTML that I want on the back-end, where I have the current state readily at hand. Which is, after all, the entire point of HATEOAS.
I get that it makes some stuff easier, but I'm not a huge fan of the fact that we've replaced virtualenvs with docker containers.
I guess I need to adapt the way I work and learn new tools, but I really hate having so many layers between me and my files. Makes debugging such a hassle 😿
(this toot brought to you by a 2h fight with docker that I apparently lost)
I've just posted a 2-part blog series on what I've dubbed "third way web development" a return to the power and simplicity of hypermedia but one that is able to meet modern UX demands that conventional wisdom says is only available in mainstream FE frameworks.
Right, #idiomorph¹ is now integrated into #Kitten² and enjoys first-class support via the <page> tag like #htmx itself, the htmx #WebSocket extension, Alpine.js, and Water semantic #CSS library.
It’s auto-loaded for you if you expose onConnect() handlers in your pages when using the new #StreamingHTML workflow.
(You must still manually add htmx-swap-oob='morph' to elements you want to morph. I might add syntactic sugar for this later.)
@andros In reality, HTMX is more than just fetch in Javascript 😅
The project goal from its website:
> "htmx gives you access to AJAX, CSS Transitions, WebSockets and Server Sent Events directly in HTML, using attributes, so you can build modern user interfaces with the simplicity and power of hypertext" https://htmx.org/ #htmx#javascript#ajax#css#websockets#sse#html#hypertext
Very excited about the latest feature/workflow I’m adding to Kitten. I call it… 🥁
✨ Streaming HTML ✨
Implement back-end functionality and stream HTML updates to the client without writing any front-end JavaScript.
Just give your forms names and listen for them in an onConnect() handler you export from your page. Kitten handles everything else – setting up a WebSocket route for you, mapping triggers to events, etc. – thanks to Kitten + #htmx magic 🪄
Been having fun learning another web framework called Litestar, and it's pretty great. It already has a lot of htmx support built in (particularly around request and response helpers).
I decided to add Litestar support to jinja2-fragments, a little library that allows rendering of individual "blocks" from Jinja templates.
When returning a response, you can choose to send the entire template, or just one of the blocks contained within the template.
The #Glasgow2024#HugoAwards nomination process is now open, and I'm proud to say that the nomination site is an “I built that" thing; I was asked to provide the software rather last minute, and I'm pleased to see it in use like this.