Open librasteve opened 4 months ago
Sometime back, I wrote these blog posts that chose a slightly different, but relevant approach:
would be cool to use @codesections ¶ proposal
I am realising that the big hole here is setting up the htmx server side, maybe with Hummingbord or Cro
Here's an example of that done with Flask that maybe we can steal https://github.com/markusbnet/flask-htmx-demo
So, despite my lack of Tuits (including round ones), I've spent the day thinking about HTMX (though not specifically for Raku). I've realised the way I think make sense for my context is:
Note that that's specifically the interface, not the content. Not sure if that'll help, but wanted to mention it. HTH!
Oh, and for HTMX and XSLT, see https://v1.htmx.org/extensions/client-side-templates/ (XSLT example is near bottom of page, though it's probably not how I'd do it).
Absolutely did not make myself clear. The point of writing the interface in XML and then transforming via XSLT is that, if we want to replace a given Web Component, then all we have to adjust is the XSLT that transforms it into the WebComponent, and voila, it's changed across the whole site -- it makes it easier for us to change WebComponent frameworks, which increases the level of backwards compatibility.
HTH,
@wayland - thanks for your very interesting input
my initial thoughts are that we should aim for a tree, something like:
... and so on
[1] this is my next todo [2] hopefully we can figure out a pluggable deploy script [3] something like back ends for front ends
... anyway this is a very lavish vision - and starting to feel like Cro is the best framework since it has transformers and database built right in
... now I said that looks like Cro context is a good pattern for (template format agnostic) hydration of parameters as per https://wordpress.com/post/rakujourney.wordpress.com/432
Hi!
I'd recommend not adding XSLT just for me (though add it if you like it), because my vision of a web frontend is more like:
HTH some.
I am closing this since this project is now somewhat down the road and past inception - please feel free to comment on existing Issues or to raise new Issues if you have any contributions or feedback.
PLEASE DO CHIME IN WITH YOUR THOUGHTS
My personal idea for this module is:
To have a raku module that does this set of things around HTMX (see htmx.org):
Here is my take on "Elm-like style" from here
Note that this module conceptually is aligned just to Elm
import Html
andimport Html.Attributes
and deliberately excludes the more dynamic bits of Elm which is why this example is chosen as representative. Why not - well dynamic behaviours come from HTMX!So in raku source code style, that would be something like:
Hopefully the syntactic intent of using standard raku quoting, sub & attribute constructs is clear - even if I butchered the example a bit.
There would be decent defaults for header and so on to avoid having to do the boilerplate incantations.