alexzeitler, to webdev
@alexzeitler@mastodon.social avatar
alcinnz, to random
@alcinnz@floss.social avatar

What to expect from your framework - Johan Halse:
https://johan.hal.se/wrote/2023/02/17/what-to-expect-from-your-framework/

benpate,
@benpate@mastodon.social avatar

@alcinnz Love this article. Thank you for sharing!

Under the “no solutions” section, I’ll suggest https://htmx.org as a potential option. Yes, 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.

schizanon, (edited ) to webdev

If there was an 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!

schizanon, (edited )

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.

What should it be called?

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

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
Widget7195, to Podcast

Can anyone recommend a good #podcast or #podcasts for a budding #indiehacker whos' using #python #django #htmx and #aplinejs to #buildinpublic?

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.

#http #htmx #htmx2

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
Michaelcarducci, to webdev

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

#Kitten #SmallWeb #StreamingHTML #web #dev #html #JavaScript

aral,
@aral@mastodon.ar.al avatar

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

¹ 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?

#htmx #production #development #memes #html #javascript #http

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/
#htmx #javascript #ajax #css #websockets #sse #html #hypertext

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

#Kitten #SmallWeb #StreamingHTML #web #dev

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

#Kitten #SmallWeb #StreamingHTML #web #dev #htmx #WebSocket #html #css #JavaScript

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 #tailwindcss for someone who is totally bad at design, don't know much about html/css and want to build something with #golang and #htmx ?

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

offby1, to python
@offby1@wandering.shop avatar

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.

For those of you interested in the technical aspects, it is written in #Python / #Django / #HTMX 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

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