News for hackers. Stuff that matters.

rougemine

It feels weird at the beginning, but after a bit of practice I found it pretty nice to write HTML in Python.

Here is an example of a HTML page layout written with the DOMinate [1] library for example, in a "JSX-like" way:

https://github.com/olivierphi/zakuchess/blob/main/src/apps/w...

It may hurt your eyes at first sight, for sure... But similarly to technologies like Tailwind CSS, it's mostly a matter of getting used to it - and after a while it end ups feeling very natural to use :-)

1: https://github.com/Knio/dominate#readme

Re:htmx 2.0.0-beta1 on Sunday March 17, 2024 @03:08PM (#39737074)
It’s possible to build quite dynamic user interfaces with htmx - even games :-)

β€”> https://zakuchess.com/

One benefit I found to it is that it allows developers to keep the business logic entirely on the backed side, without having to duplicate any effort on the frontend side.

Ah, good idea! I will do, thanks :-)

Show HN: ZakuChess, an open source web game built with Django, htmx and Tailwind

https://zakuchess.com

A while ago I started this side project to test if I could build a rich User Interface that would have about the same level of responsiveness than a "SPA-like" app, but using only htmx[1]... I still have plenty of stuff in my roadmap, but today it's in a playable state and I thought it could be interesting to share it - as it may be a nice demonstration of a relatively rich user interface...

( Read More... | 2 comments | 2 points | on HN )
Well unless you use a less traditional setup such as FrankenPHP, in order to run PHP behind a Nginx server you still need a long running process for PHP-FPM, if I'm not wrong? :-)