andros, to python Spanish
@andros@hostux.social avatar

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

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.

mandrasch, to webdev
@mandrasch@social.tchncs.de avatar

Small coding challenge for

How would you solve the following in 2024?

  • Server provides a list of destinations (JSON or data-xyz="" attributes), no pagination
  • rendered as card grid
  • JS: on click --> open modal with more details

Codepen: https://codepen.io/matthias_vie/pen/KKEeMLr

Would love to use Svelte, but want to achieve it without extra build step (legacy project).

Thought about and Template Fragments https://htmx.org/essays/template-fragments/? Any recommendations for a clean solution?

jitterted, to random
@jitterted@sfba.social avatar

Getting used to the 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.

DiazCarrete, to random
@DiazCarrete@hachyderm.io avatar

4:40 "I'm a huge fan of debugging"
📽️ 🔗 https://www.youtube.com/watch?v=javGxN-h9VQ

schizanon, to javascript
@schizanon@mas.to avatar
Widget7195, to Podcast

Can anyone recommend a good or for a budding whos' using and to ?

tbroyer, to random
@tbroyer@piaille.fr avatar

Tell me you don't understand REST and HTTP without saying you don't understand REST and HTTP.

bmispelon, to random
@bmispelon@mastodon.social avatar

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)

carlton,
@carlton@fosstodon.org avatar

@bmispelon I’m just going to rob it off of

“Daily reminder” 🥳

schizanon, to random
@schizanon@mas.to avatar
Michaelcarducci, to webdev
@Michaelcarducci@mastodon.social avatar

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.

Part I (https://sufficiently-advanced.technology/post/third-way-web-development-part-i) deals with the history & motivation for this series & introduces .

Part II (https://sufficiently-advanced.technology/post/third-way-web-development-part-ii) is a comprehensive intro based on my experience putting this into prod.

aral, to SmallWeb
@aral@mastodon.ar.al avatar

I’m really enjoying the new Streaming HTML workflow in Kitten…

In this 15 second video, I cycle through the options in a selection box using the keyboard and the rest of the interface updates in response.

✨ There’s no custom client-side JavaScript making it happen. ✨

It’s all server side.

The changes stream to the client as HTML and are morphed into place via idiomorph.

So simple and maintainable.

💕

https://vimeo.com/908339606

aral,
@aral@mastodon.ar.al avatar

Right, is now integrated into and enjoys first-class support via the <page> tag like itself, the htmx extension, Alpine.js, and Water semantic library.

It’s auto-loaded for you if you expose onConnect() handlers in your pages when using the new workflow.

(You must still manually add htmx-swap-oob='morph' to elements you want to morph. I might add syntactic sugar for this later.)

¹ https://github.com/bigskysoftware/idiomorph/tree/main?tab=readme-ov-file#%EF%B8%8F-idiomorph

² https://codeberg.org/kitten/app

paulox, (edited ) to memes
@paulox@fosstodon.org avatar

RT @htmx_org

So is anyone actually using htmx or what?

paulox,
@paulox@fosstodon.org avatar

@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/

aral, to SmallWeb
@aral@mastodon.ar.al avatar

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 + magic 🪄

aral,
@aral@mastodon.ar.al avatar

So the canonical example for any new web workflow appears to be a simple counter button.

Here’s one showing you the new Streaming HTML workflow in Kitten¹.

Note that the count is actually being persisted in the database (notice I turn the development server off and back on again mid demo).

What you see in the video is all the code there is in the project.

https://vimeo.com/907918005

¹ https://codeberg.org/kitten/app

aral,
@aral@mastodon.ar.al avatar

Right, this is now merged in main.

Please consider the Streaming HTML workflow very experimental for the time being (as all of Kitten is, really, but this more so).

There’s also still scant documentation but that will improve in the coming days. (I’ve added this demo to the readme.)

https://codeberg.org/kitten/app#to-whet-your-appetite

pythonbynight, to random
@pythonbynight@fosstodon.org avatar

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.

https://github.com/sponsfreixes/jinja2-fragments

pythonbynight,
@pythonbynight@fosstodon.org avatar

You can install from PyPI:

https://pypi.org/project/jinja2-fragments/

If you haven't tried Litestar, why not give it a try?

https://litestar.dev

But even if not, jinja2-fragments also has support for Flask, Quart, Sanic, and FastAPI!

sergi, to random
@sergi@floss.social avatar

New release of Jinja Fragments is out with support for Litestar thanks to @pythonbynight !

https://pypi.org/project/jinja2-fragments/

0xZogG, to golang
@0xZogG@hachyderm.io avatar

Is for someone who is totally bad at design, don't know much about html/css and want to build something with and ?

If there is another lightweight easy entry alternative - please leave a comment 🙏🏽

offby1, to python
@offby1@wandering.shop avatar

The 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.

For those of you interested in the technical aspects, it is written in / / and is fully open source; you can check out the code at https://github.com/WorldconVotingSystems/nomnom and contribute, too.

I am hoping to see it used for Seattle in 2025's Worldcon as well

aral, to SmallWeb
@aral@mastodon.ar.al avatar

Making a little Kitten app called Streamiverse that lets you create a curated streaming timeline of fediverse posts using the Mastodon API that can be consumed via WebSocket when teaching web development and creating demo apps during presentations, etc.

Previously, you could consume the public stream from a Mastodon instance directly but that feature was recently removed, breaking, among other things, the WebSocket sample app for Kitten.

https://vimeo.com/906517110

aral,
@aral@mastodon.ar.al avatar

It’s just a quick, small app (and it’s not done yet) but you can check out the source at https://codeberg.org/small-web/streamiverse if you want to get some idea of how simple it is to develop Small Web apps with Kitten¹.

I’m especially starting to love the htmx + WebSocket-based pattern I’m using everywhere now where you basically stream interface updates from the server to the client. It’s not refactored yet but, e.g., see https://codeberg.org/small-web/streamiverse/src/branch/main/settings%F0%9F%94%92/curate.socket.js

¹ https://codeberg.org/kitten/app

paulox, to webdev
@paulox@fosstodon.org avatar

RT @htmx_org

htmx 2.0 alpha1 targeted for release tomorrow

upgrade guide:
https://v2-0v2-0.htmx.org/migration-guide-htmx-1/

schizanon, to random
@schizanon@mas.to avatar

> They either never learned, refused to learn, or didn’t find out where or even why things are done a certain way, and go diving to say “i can do better” before they even know what “better” is… much less have the ability to recognize how badly they are screwing themselves, and everyone else who gets suckered into thinking the nonsense is magically “easier”, “better”, or any of the other glittering generalities and propaganda

> And has all that in spades.

https://medium.com/codex/htmx-the-framework-stupid-gets-dialed-up-to-eleven-2e18f7f2152a

volfpeter, to random
@volfpeter@mastodon.social avatar

I just dropped fasthx on PyPI: @FastAPI and the right (and easy) way. Supports any templating or server side rendering engine with builtin support. Decorator syntax, correct typing, flexibility, simplicity :)

See the details here: https://pypi.org/project/fasthx/

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • thenastyranch
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • ngwrru68w68
  • provamag3
  • magazineikmin
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • JUstTest
  • All magazines