News for hackers. Stuff that matters.
Re:Ludic: New framework for Python with seamless Htmx support by kissgyorgy on Thursday March 21, 2024 @08:26AM (#39777645)
Until you try it out and realize the benefits!

- Type safe HTML: you get an exception instead of malformed HTML

- Truly reusable components: any Python web framework, component packages are truly reusable in any other projects. I never seen this with template engines.

- Huge productivity boost: not even close! No hunting for templates, no jumping between files, everything is in Python functions.

- Composable elements: you can nest things as much as you want, refactor very easily. Doing this with templates is not even possible, or such a pain I never did it.

- Storybook: There are a couple ones for Django, but they are clunky and not reusable at all.

I felt the same for a long time, but started thinking about a nice API. It took me months, but I finally got it: https://github.com/kissgyorgy/compone

Re:Ludic: New framework for Python with seamless Htmx support by grrandalf on Thursday March 21, 2024 @02:00PM (#39782117)
Insightful summary. Thx.
Re:Ludic: New framework for Python with seamless Htmx support by mixmastamyk on Thursday March 21, 2024 @03:12PM (#39783061)
Yes, I quite like the idea of being able to run pyflakes/flake8/black/pytest/mypy over my "html templates", and benefiting from all the power that entails.
Re:Ludic: New framework for Python with seamless Htmx support by Ringz on Thursday March 21, 2024 @06:29PM (#39785223)
Try ruff [0] and get rid of flake and black

[0]: https://github.com/astral-sh/ruff

Re:Ludic: New framework for Python with seamless Htmx support by mixmastamyk on Thursday March 21, 2024 @08:24PM (#39786113)
I'm aware of it, but it obscures functionality for my previous statement.